|
| 1 | +import globals from 'globals' |
| 2 | +import pluginJs from '@eslint/js' |
| 3 | +import pluginVue from 'eslint-plugin-vue' |
| 4 | + |
| 5 | +export default [ |
| 6 | + {files: ['**/*.{js,mjs,cjs,vue}']}, |
| 7 | + {languageOptions: { globals: globals.browser }}, |
| 8 | + pluginJs.configs.recommended, |
| 9 | + ...pluginVue.configs['flat/essential'], |
| 10 | + { |
| 11 | + rules: { |
| 12 | + 'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off', |
| 13 | + 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off', |
| 14 | + 'vue/no-multiple-template-root': 'off', |
| 15 | + 'vue/multi-word-component-names': 'off', |
| 16 | + 'linebreak-style': ['error', 'unix'], |
| 17 | + 'quotes': ['error', 'single'], |
| 18 | + 'brace-style': 'error', |
| 19 | + 'comma-dangle': 'error', |
| 20 | + 'comma-spacing': 'error', |
| 21 | + 'keyword-spacing': 'error', |
| 22 | + 'no-trailing-spaces': 'error', |
| 23 | + 'no-unneeded-ternary': 'error', |
| 24 | + 'space-before-function-paren': ['error', 'never'], |
| 25 | + 'space-infix-ops': ['error', {'int32Hint': false}], |
| 26 | + 'arrow-spacing': 'error', |
| 27 | + 'no-var': 'error', |
| 28 | + 'no-duplicate-imports': 'error', |
| 29 | + 'space-before-blocks': 'error', |
| 30 | + 'space-in-parens': ['error', 'never'], |
| 31 | + 'no-multi-spaces': 'error', |
| 32 | + 'eqeqeq': 'error', |
| 33 | + 'indent': ['error', 2], |
| 34 | + 'semi': ['error', 'never'] |
| 35 | + } |
| 36 | + } |
| 37 | +] |
0 commit comments