1
1
module . exports = {
2
2
parser : "@typescript-eslint/parser" ,
3
- " parserOptions" : {
4
- " project" : "./tsconfig.json"
3
+ parserOptions : {
4
+ project : "./tsconfig.json"
5
5
} ,
6
- plugins : [ "@typescript-eslint" ] ,
7
- extends : [ "airbnb-base" , "plugin:@typescript-eslint/recommended" ] ,
6
+ plugins : [ "@typescript-eslint" , "prettier" ] ,
7
+ extends : [
8
+ "airbnb-base" ,
9
+ "eslint:recommended" ,
10
+ "plugin:@typescript-eslint/eslint-recommended" ,
11
+ "plugin:@typescript-eslint/recommended" ,
12
+ "prettier" ,
13
+ "prettier/@typescript-eslint"
14
+ ] ,
8
15
env : {
9
16
node : true ,
10
17
mocha : true ,
11
18
} ,
12
19
settings :{
20
+ "import/extensions" : [
21
+ ".ts"
22
+ ] ,
23
+ "import/parsers" : {
24
+ "@typescript-eslint/parser" : [
25
+ ".ts"
26
+ ]
27
+ } ,
13
28
"import/resolver" : {
14
29
node : {
15
30
extensions : [ ".ts" ]
31
+ } ,
32
+ "typescript" : {
33
+ "alwaysTryTypes" : true
16
34
}
17
35
}
18
36
} ,
19
37
globals : {
20
38
NodeJS : 'readonly' ,
21
39
} ,
22
40
rules : {
41
+ "import/extensions" : [
42
+ "error" ,
43
+ "ignorePackages" ,
44
+ {
45
+ "ts" : "never"
46
+ }
47
+ ] ,
48
+ "prettier/prettier" : "error" ,
23
49
"indent" : [
24
50
"error" ,
25
51
4
26
52
] ,
27
- "comma-dangle" : [ "error" , {
28
- "arrays" : "always-multiline" ,
29
- "objects" : "always-multiline" ,
30
- "imports" : "always-multiline" ,
31
- "exports" : "always-multiline" ,
32
- "functions" : "never"
33
- } ] ,
34
53
"no-restricted-syntax" : [ "error" , "ForInStatement" , "LabeledStatement" , "WithStatement" ] ,
35
54
"object-curly-spacing" : [ "error" , "always" ] ,
36
- "array-bracket-spacing" : [ "error" , "always" ] ,
37
55
"no-underscore-dangle" : 0 ,
38
56
"max-len" : [ "error" , 150 , 2 , {
39
57
ignoreComments : false ,
@@ -43,4 +61,24 @@ module.exports = {
43
61
ignoreTemplateLiterals : true ,
44
62
} ]
45
63
} ,
64
+ overrides : [
65
+ {
66
+ "files" : [
67
+ "*.test.ts"
68
+ ] ,
69
+ "rules" : {
70
+ "@typescript-eslint/explicit-function-return-type" : "off" ,
71
+ "@typescript-eslint/ban-ts-ignore" : "off"
72
+ }
73
+ } ,
74
+ {
75
+ "files" : [
76
+ "*.js"
77
+ ] ,
78
+ "rules" : {
79
+ "@typescript-eslint/explicit-function-return-type" : "off" ,
80
+ "@typescript-eslint/no-var-requires" : "off"
81
+ }
82
+ }
83
+ ]
46
84
} ;
0 commit comments