-
Notifications
You must be signed in to change notification settings - Fork 3
/
.eslintrc.js
74 lines (73 loc) · 1.91 KB
/
.eslintrc.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
module.exports = {
root: true,
env: {
browser: true,
node: true,
es6: true,
},
parser: 'vue-eslint-parser',
parserOptions: {
parser: '@typescript-eslint/parser',
ecmaVersion: 2020,
sourceType: 'module',
jsxPragma: 'React',
ecmaFeatures: {
jsx: true,
},
},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'prettier',
],
plugins: ['@typescript-eslint', 'prettier'],
rules: {
'no-sparse-arrays': 0,
'no-inner-declarations': 0,
'no-constant-condition': 0,
'no-unused-vars': [
2,
{
// 允许声明未使用变量
vars: 'local',
// 参数不检查
args: 'none',
},
],
'@typescript-eslint/indent': 0,
'@typescript-eslint/no-empty-function': 0,
'@typescript-eslint/explicit-member-accessibility': [
2,
{ accessibility: 'no-public' },
],
'@typescript-eslint/no-non-null-assertion': 0,
'@typescript-eslint/no-use-before-define': [2, { functions: false }],
'@typescript-eslint/no-namespace': 0,
'@typescript-eslint/ban-ts-ignore': 0,
'@typescript-eslint/no-empty-interface': 1,
'@typescript-eslint/camelcase': 0,
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/no-var-requires': 0,
'node/no-callback-literal': 'off',
'prettier/prettier': 2,
'import/namespace': 'off',
'import/default': 'off',
'import/no-named-as-default': 'off',
'import/no-named-as-default-member': 'off',
},
overrides: [
{
files: ['**/*.md', '**/*.md/*.*', 'examples'],
rules: {
'no-alert': 'off',
'no-console': 'off',
'no-undef': 'off',
'no-unused-vars': 'off',
'no-restricted-imports': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/no-redeclare': 'off',
},
},
],
}