|
| 1 | +const isProduction = process.env.NODE_ENV === 'production'; |
| 2 | + |
| 3 | +module.exports = { |
| 4 | + root: true, |
| 5 | + env: { |
| 6 | + node: true, |
| 7 | + }, |
| 8 | + extends: [ |
| 9 | + 'plugin:vue/vue3-essential', |
| 10 | + '@vue/airbnb', |
| 11 | + '@vue/typescript/recommended', |
| 12 | + ], |
| 13 | + parserOptions: { |
| 14 | + ecmaVersion: 2021, |
| 15 | + }, |
| 16 | + rules: { |
| 17 | + '@typescript-eslint/ban-types': 'off', |
| 18 | + '@typescript-eslint/ban-ts-comment': 'off', |
| 19 | + '@typescript-eslint/brace-style': 'off', |
| 20 | + '@typescript-eslint/lines-between-class-members': 'off', |
| 21 | + '@typescript-eslint/no-explicit-any': 'off', |
| 22 | + '@typescript-eslint/no-unused-vars': isProduction ? 'error' : 'warn', |
| 23 | + 'arrow-parens': 'off', |
| 24 | + 'brace-style': ['error', 'stroustrup', { allowSingleLine: true }], |
| 25 | + 'camelcase': 'off', |
| 26 | + 'class-methods-use-this': 'off', |
| 27 | + 'import/extensions': 'off', |
| 28 | + 'import/no-cycle': 'off', |
| 29 | + 'linebreak-style': 'off', |
| 30 | + 'lines-between-class-members': 'off', |
| 31 | + 'max-classes-per-file': 'off', |
| 32 | + 'no-await-in-loop': 'off', |
| 33 | + 'no-console': isProduction ? 'warn' : 'off', |
| 34 | + 'no-continue': 'off', |
| 35 | + 'no-debugger': isProduction ? 'warn' : 'off', |
| 36 | + 'no-empty': 'off', |
| 37 | + 'no-multiple-empty-lines': ['error', { max: 2, maxEOF: 1, maxBOF: 1 }], |
| 38 | + 'no-param-reassign': 'off', |
| 39 | + 'no-plusplus': 'off', |
| 40 | + 'no-restricted-globals': 'off', |
| 41 | + // https://github.com/typescript-eslint/typescript-eslint/blob/main/docs/linting/TROUBLESHOOTING.md#i-get-errors-from-the-no-undef-rule-about-global-variables-not-being-defined-even-though-there-are-no-typescript-errors |
| 42 | + 'no-undef': 'off', |
| 43 | + 'prefer-object-spread': 'off', |
| 44 | + |
| 45 | + 'vuejs-accessibility/heading-has-content': 'off', |
| 46 | + 'vuejs-accessibility/mouse-events-have-key-events': 'off', |
| 47 | + 'vuejs-accessibility/click-events-have-key-events': 'off', |
| 48 | + 'vuejs-accessibility/label-has-for': 'off', |
| 49 | + 'vuejs-accessibility/form-control-has-label': 'off', |
| 50 | + }, |
| 51 | + overrides: [ |
| 52 | + { |
| 53 | + files: [ |
| 54 | + '**/__tests__/*.{j,t}s?(x)', |
| 55 | + '**/tests/unit/**/*.spec.{j,t}s?(x)', |
| 56 | + ], |
| 57 | + env: { |
| 58 | + jest: true, |
| 59 | + }, |
| 60 | + }, |
| 61 | + ], |
| 62 | +}; |
0 commit comments