1
1
module . exports = {
2
2
env : {
3
- ' browser' : false ,
4
- ' es2020' : true ,
5
- ' jest' : true ,
6
- ' node' : true ,
3
+ browser : false ,
4
+ es2020 : true ,
5
+ jest : true ,
6
+ node : true ,
7
7
} ,
8
- extends : [
9
- 'plugin:@typescript-eslint/eslint-recommended' ,
10
- 'plugin:@typescript-eslint/recommended'
11
- ] ,
8
+ extends : [ 'plugin:@typescript-eslint/eslint-recommended' , 'plugin:@typescript-eslint/recommended' ] ,
12
9
parser : '@typescript-eslint/parser' ,
13
10
plugins : [ '@typescript-eslint' ] ,
11
+ settings : {
12
+ 'import/resolver' : {
13
+ node : { } ,
14
+ typescript : {
15
+ project : './tsconfig.es.json' ,
16
+ alwaysTryTypes : true ,
17
+ } ,
18
+ } ,
19
+ } ,
14
20
rules : {
15
21
'@typescript-eslint/ban-ts-ignore' : [ 'off' ] ,
16
22
'@typescript-eslint/camelcase' : [ 'off' ] ,
17
- '@typescript-eslint/explicit-function-return-type' : [ 'error' , { ' allowExpressions' : true } ] ,
23
+ '@typescript-eslint/explicit-function-return-type' : [ 'error' , { allowExpressions : true } ] ,
18
24
'@typescript-eslint/explicit-member-accessibility' : 'error' ,
19
- '@typescript-eslint/indent' : [ 'error' , 2 , { ' SwitchCase' : 1 } ] ,
25
+ '@typescript-eslint/indent' : [ 'error' , 2 , { SwitchCase : 1 } ] ,
20
26
'@typescript-eslint/interface-name-prefix' : [ 'off' ] ,
21
- '@typescript-eslint/member-delimiter-style' : [ 'error' , { 'multiline' : { 'delimiter' : 'none' } } ] ,
22
- '@typescript-eslint/member-ordering' : [ 'error' , {
23
- 'default' : { 'memberTypes' : [
24
- 'signature' ,
25
- 'public-field' , // = ["public-static-field", "public-instance-field"]
26
- 'protected-field' , // = ["protected-static-field", "protected-instance-field"]
27
- 'private-field' , // = ["private-static-field", "private-instance-field"]
28
- 'constructor' ,
29
- 'public-method' , // = ["public-static-method", "public-instance-method"]
30
- 'protected-method' , // = ["protected-static-method", "protected-instance-method"]
31
- 'private-method' // = ["private-static-method", "private-instance-method"]
32
- ] ,
33
- 'order' : 'alphabetically' }
34
- } ] ,
27
+ '@typescript-eslint/member-delimiter-style' : [ 'error' , { multiline : { delimiter : 'none' } } ] ,
28
+ '@typescript-eslint/member-ordering' : [
29
+ 'error' ,
30
+ {
31
+ default : {
32
+ memberTypes : [
33
+ 'signature' ,
34
+ 'public-field' , // = ["public-static-field", "public-instance-field"]
35
+ 'protected-field' , // = ["protected-static-field", "protected-instance-field"]
36
+ 'private-field' , // = ["private-static-field", "private-instance-field"]
37
+ 'constructor' ,
38
+ 'public-method' , // = ["public-static-method", "public-instance-method"]
39
+ 'protected-method' , // = ["protected-static-method", "protected-instance-method"]
40
+ 'private-method' , // = ["private-static-method", "private-instance-method"]
41
+ ] ,
42
+ order : 'alphabetically' ,
43
+ } ,
44
+ } ,
45
+ ] ,
35
46
'@typescript-eslint/no-explicit-any' : 'error' ,
36
47
'@typescript-eslint/no-inferrable-types' : [ 'off' ] ,
37
- '@typescript-eslint/no-unused-vars' : [ 'error' , { ' argsIgnorePattern' : '^_' } ] ,
48
+ '@typescript-eslint/no-unused-vars' : [ 'error' , { argsIgnorePattern : '^_' } ] ,
38
49
'@typescript-eslint/no-use-before-define' : [ 'off' ] ,
39
- '@typescript-eslint/semi' : [ 'error' , 'always' ] ,
40
- 'array-bracket-spacing' : [ 'error' , 'always' , { ' singleValue' : false } ] ,
41
- 'arrow-body-style' : [ 'error' , 'as-needed' ] ,
42
- 'computed-property-spacing' : [ 'error' , 'never' ] ,
43
- 'func-style' : [ 'warn' , 'expression' ] ,
44
- ' indent' : [ 'error' , 2 , { ' SwitchCase' : 1 } ] ,
50
+ '@typescript-eslint/semi' : [ 'error' , 'always' ] ,
51
+ 'array-bracket-spacing' : [ 'error' , 'always' , { singleValue : false } ] ,
52
+ 'arrow-body-style' : [ 'error' , 'as-needed' ] ,
53
+ 'computed-property-spacing' : [ 'error' , 'never' ] ,
54
+ 'func-style' : [ 'warn' , 'expression' ] ,
55
+ indent : [ 'error' , 2 , { SwitchCase : 1 } ] ,
45
56
'keyword-spacing' : 'error' ,
46
57
'newline-before-return' : 2 ,
47
58
'no-console' : 0 ,
48
- 'no-multi-spaces' : [ 'error' , { ' ignoreEOLComments' : false } ] ,
49
- 'no-multiple-empty-lines' : [ 'error' , { ' max' : 1 , ' maxBOF' : 0 } ] ,
59
+ 'no-multi-spaces' : [ 'error' , { ignoreEOLComments : false } ] ,
60
+ 'no-multiple-empty-lines' : [ 'error' , { max : 1 , maxBOF : 0 } ] ,
50
61
'no-throw-literal' : 'error' ,
51
- 'object-curly-spacing' : [ 'error' , 'always' ] ,
62
+ 'object-curly-spacing' : [ 'error' , 'always' ] ,
52
63
'prefer-arrow-callback' : 'error' ,
53
- 'quotes' : [ 'error' , 'single' , { 'allowTemplateLiterals' : true } ] ,
54
- 'semi' : [ 'error' , 'always' ] ,
55
- 'sort-imports' : [ 'error' , {
56
- 'allowSeparatedGroups' : true ,
57
- 'ignoreCase' : true ,
58
- 'ignoreDeclarationSort' : false ,
59
- 'ignoreMemberSort' : true ,
60
- 'memberSyntaxSortOrder' : [ 'all' , 'single' , 'multiple' , 'none' ]
61
- } ]
62
- }
63
- } ;
64
+ quotes : [ 'error' , 'single' , { allowTemplateLiterals : true } ] ,
65
+ semi : [ 'error' , 'always' ] ,
66
+ 'sort-imports' : [
67
+ 'error' ,
68
+ {
69
+ allowSeparatedGroups : true ,
70
+ ignoreCase : true ,
71
+ ignoreDeclarationSort : false ,
72
+ ignoreMemberSort : true ,
73
+ memberSyntaxSortOrder : [ 'all' , 'single' , 'multiple' , 'none' ] ,
74
+ } ,
75
+ ] ,
76
+ } ,
77
+ } ;
0 commit comments