-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.eslintrc.js
54 lines (51 loc) · 1.4 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
module.exports = {
root: true,
env: {
browser: true,
node: true,
es6: true,
},
// overrides: [
// {
// files: ['*.{ts,tsx}'],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
},
plugins: ['@typescript-eslint'],
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'plugin:prettier/recommended'],
// },
// ],
// extends: ['eslint:recommended', 'plugin:prettier/recommended'],
// parserOptions: {
// parser: '@babel/eslint-parser',
// requireConfigFile: false,
// ecmaVersion: 'latest',
// sourceType: 'module',
// ecmaFeatures: {
// globalReturn: true,
// impliedStrict: false,
// jsx: true,
// },
// },
rules: {
// 和 vscode 配置中需要一致
'prettier/prettier': [
'warn',
{
arrowParens: 'avoid',
endOfLine: 'lf',
htmlWhitespaceSensitivity: 'ignore',
singleQuote: true,
jsxSingleQuote: true,
useTabs: false,
tabWidth: 4,
printWidth: 120,
},
],
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unused-vars': 'warn',
'@typescript-eslint/ban-ts-comment': 'off',
},
};