|
| 1 | +/* eslint-env node */ |
| 2 | +require('@rushstack/eslint-patch/modern-module-resolution') |
| 3 | + |
| 4 | +// eslint-disable-next-line @typescript-eslint/no-var-requires |
| 5 | +const {defineConfig} = require('eslint-define-config') |
| 6 | + |
| 7 | +module.exports = defineConfig({ |
| 8 | + root: true, |
| 9 | + env: { |
| 10 | + browser: true, |
| 11 | + node: true, |
| 12 | + }, |
| 13 | + parser: 'vue-eslint-parser', |
| 14 | + parserOptions: { |
| 15 | + parser: '@typescript-eslint/parser', |
| 16 | + ecmaVersion: 'latest', |
| 17 | + }, |
| 18 | + extends: [ |
| 19 | + 'eslint:recommended', |
| 20 | + 'plugin:vue/vue3-recommended', |
| 21 | + '@nuxtjs/eslint-config-typescript', |
| 22 | + '@vue/eslint-config-prettier', |
| 23 | + 'plugin:vuejs-accessibility/recommended', |
| 24 | + ], |
| 25 | + plugins: ['vuejs-accessibility'], |
| 26 | + rules: { |
| 27 | + 'prettier/prettier': [ |
| 28 | + 'warn', |
| 29 | + { |
| 30 | + endOfLine: 'auto', |
| 31 | + }, |
| 32 | + ], |
| 33 | + 'no-alert': 'warn', |
| 34 | + 'no-console': 'warn', |
| 35 | + 'no-debugger': 'warn', |
| 36 | + 'arrow-body-style': 'warn', |
| 37 | + 'eqeqeq': 'error', |
| 38 | + 'generator-star-spacing': 'warn', |
| 39 | + 'grouped-accessor-pairs': 'warn', |
| 40 | + 'no-caller': 'error', |
| 41 | + 'no-duplicate-imports': 'error', |
| 42 | + 'no-else-return': 'warn', |
| 43 | + 'no-eval': 'error', |
| 44 | + 'no-extra-bind': 'warn', |
| 45 | + 'no-implied-eval': 'error', |
| 46 | + 'no-labels': 'warn', |
| 47 | + 'no-lone-blocks': 'warn', |
| 48 | + 'no-new-func': 'error', |
| 49 | + 'no-new-wrappers': 'error', |
| 50 | + 'no-return-await': 'warn', |
| 51 | + 'no-template-curly-in-string': 'warn', |
| 52 | + 'no-throw-literal': 'error', |
| 53 | + 'no-undef-init': 'warn', |
| 54 | + 'no-useless-call': 'warn', |
| 55 | + 'no-useless-constructor': 'warn', |
| 56 | + 'no-useless-rename': 'warn', |
| 57 | + 'no-useless-return': 'warn', |
| 58 | + 'no-var': 'error', |
| 59 | + 'object-shorthand': 'warn', |
| 60 | + 'prefer-const': 'warn', |
| 61 | + 'prefer-destructuring': 'warn', |
| 62 | + 'prefer-numeric-literals': 'warn', |
| 63 | + 'prefer-rest-params': 'warn', |
| 64 | + 'prefer-spread': 'warn', |
| 65 | + 'prefer-template': 'warn', |
| 66 | + 'require-atomic-updates': 'warn', |
| 67 | + 'rest-spread-spacing': 'warn', |
| 68 | + 'sort-imports': [ |
| 69 | + 'warn', |
| 70 | + { |
| 71 | + ignoreCase: true, |
| 72 | + ignoreDeclarationSort: true, |
| 73 | + }, |
| 74 | + ], |
| 75 | + 'template-curly-spacing': 'warn', |
| 76 | + 'yield-star-spacing': 'warn', |
| 77 | + 'yoda': 'warn', |
| 78 | + 'vue/html-self-closing': [ |
| 79 | + 'error', |
| 80 | + { |
| 81 | + html: { |
| 82 | + void: 'always', |
| 83 | + normal: 'always', |
| 84 | + component: 'always', |
| 85 | + }, |
| 86 | + svg: 'always', |
| 87 | + math: 'always', |
| 88 | + }, |
| 89 | + ], |
| 90 | + 'vue/eqeqeq': 'error', |
| 91 | + }, |
| 92 | +}) |
0 commit comments