|
| 1 | +module.exports = { |
| 2 | + // https://eslint.org/docs/user-guide/configuring#configuration-cascading-and-hierarchy |
| 3 | + // This option interrupts the configuration hierarchy at this file |
| 4 | + // Remove this if you have an higher level ESLint config file (it usually happens into a monorepos) |
| 5 | + root: true, |
| 6 | + |
| 7 | + parserOptions: { |
| 8 | + parser: '@babel/eslint-parser', |
| 9 | + ecmaVersion: 2018, // Allows for the parsing of modern ECMAScript features |
| 10 | + sourceType: 'module' // Allows for the use of imports |
| 11 | + }, |
| 12 | + |
| 13 | + env: { |
| 14 | + browser: true |
| 15 | + }, |
| 16 | + |
| 17 | + // Rules order is important, please avoid shuffling them |
| 18 | + extends: [ |
| 19 | + // Base ESLint recommended rules |
| 20 | + // 'eslint:recommended', |
| 21 | + |
| 22 | + |
| 23 | + // Uncomment any of the lines below to choose desired strictness, |
| 24 | + // but leave only one uncommented! |
| 25 | + // See https://eslint.vuejs.org/rules/#available-rules |
| 26 | + 'plugin:vue/vue3-essential', // Priority A: Essential (Error Prevention) |
| 27 | + // 'plugin:vue/vue3-strongly-recommended', // Priority B: Strongly Recommended (Improving Readability) |
| 28 | + // 'plugin:vue/vue3-recommended', // Priority C: Recommended (Minimizing Arbitrary Choices and Cognitive Overhead) |
| 29 | + |
| 30 | + // https://github.com/prettier/eslint-config-prettier#installation |
| 31 | + // usage with Prettier, provided by 'eslint-config-prettier'. |
| 32 | + 'prettier' |
| 33 | + ], |
| 34 | + |
| 35 | + plugins: [ |
| 36 | + // https://eslint.vuejs.org/user-guide/#why-doesn-t-it-work-on-vue-file |
| 37 | + // required to lint *.vue files |
| 38 | + 'vue', |
| 39 | + |
| 40 | + // https://github.com/typescript-eslint/typescript-eslint/issues/389#issuecomment-509292674 |
| 41 | + // Prettier has not been included as plugin to avoid performance impact |
| 42 | + // add it as an extension for your IDE |
| 43 | + ], |
| 44 | + |
| 45 | + globals: { |
| 46 | + ga: 'readonly', // Google Analytics |
| 47 | + cordova: 'readonly', |
| 48 | + __statics: 'readonly', |
| 49 | + __QUASAR_SSR__: 'readonly', |
| 50 | + __QUASAR_SSR_SERVER__: 'readonly', |
| 51 | + __QUASAR_SSR_CLIENT__: 'readonly', |
| 52 | + __QUASAR_SSR_PWA__: 'readonly', |
| 53 | + process: 'readonly', |
| 54 | + Capacitor: 'readonly', |
| 55 | + chrome: 'readonly' |
| 56 | + }, |
| 57 | + |
| 58 | + // add your custom rules here |
| 59 | + rules: { |
| 60 | + 'prefer-promise-reject-errors': 'off', |
| 61 | + |
| 62 | + |
| 63 | + // allow debugger during development only |
| 64 | + 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off' |
| 65 | + } |
| 66 | +} |
0 commit comments