提交 | 用户 | age
3b3a74 1 // @ts-check
e09068 2 const { defineConfig } = require('eslint-define-config');
V 3 module.exports = defineConfig({
7e564c 4   root: true,
V 5   env: {
6     browser: true,
7     node: true,
8     es6: true,
9   },
2f6253 10   parser: 'vue-eslint-parser',
11   parserOptions: {
12     parser: '@typescript-eslint/parser',
13     ecmaVersion: 2020,
14     sourceType: 'module',
7e564c 15     jsxPragma: 'React',
2f6253 16     ecmaFeatures: {
17       jsx: true,
18     },
19   },
20   extends: [
21     'plugin:vue/vue3-recommended',
22     'plugin:@typescript-eslint/recommended',
7e564c 23     'prettier',
2f6253 24     'plugin:prettier/recommended',
25   ],
26   rules: {
27     '@typescript-eslint/ban-ts-ignore': 'off',
28     '@typescript-eslint/explicit-function-return-type': 'off',
29     '@typescript-eslint/no-explicit-any': 'off',
30     '@typescript-eslint/no-var-requires': 'off',
31     '@typescript-eslint/no-empty-function': 'off',
32     'vue/custom-event-name-casing': 'off',
33     'no-use-before-define': 'off',
34     '@typescript-eslint/no-use-before-define': 'off',
35     '@typescript-eslint/ban-ts-comment': 'off',
36     '@typescript-eslint/ban-types': 'off',
37     '@typescript-eslint/no-non-null-assertion': 'off',
38     '@typescript-eslint/explicit-module-boundary-types': 'off',
39     '@typescript-eslint/no-unused-vars': [
40       'error',
41       {
e12c58 42         argsIgnorePattern: '^_',
V 43         varsIgnorePattern: '^_',
2f6253 44       },
45     ],
46     'no-unused-vars': [
47       'error',
48       {
e12c58 49         argsIgnorePattern: '^_',
V 50         varsIgnorePattern: '^_',
2f6253 51       },
52     ],
53     'space-before-function-paren': 'off',
9edc28 54
V 55     'vue/attributes-order': 'off',
56     'vue/one-component-per-file': 'off',
57     'vue/html-closing-bracket-newline': 'off',
58     'vue/max-attributes-per-line': 'off',
59     'vue/multiline-html-element-content-newline': 'off',
60     'vue/singleline-html-element-content-newline': 'off',
61     'vue/attribute-hyphenation': 'off',
62     'vue/require-default-prop': 'off',
63     'vue/html-self-closing': [
64       'error',
65       {
66         html: {
67           void: 'always',
68           normal: 'never',
69           component: 'always',
70         },
71         svg: 'always',
72         math: 'always',
73       },
74     ],
2f6253 75   },
e09068 76 });