1
1
module . exports = {
2
2
env : {
3
- 'jest' : true ,
4
3
'browser' : false ,
4
+ 'es2020' : true ,
5
+ 'jest' : true ,
5
6
'node' : true ,
6
- 'es2020' : true
7
7
} ,
8
- parser : '@typescript-eslint/parser' ,
9
8
extends : [
10
9
'plugin:@typescript-eslint/eslint-recommended' ,
11
10
'plugin:@typescript-eslint/recommended'
12
11
] ,
12
+ ignorePatterns : [ 'tests/resources/*' ] ,
13
+ parser : '@typescript-eslint/parser' ,
13
14
plugins : [ '@typescript-eslint' ] ,
14
15
rules : {
15
- 'no-console' : 0 ,
16
- 'semi' : [ 'error' , 'always' ] ,
17
- 'newline-before-return' : 2 ,
18
- 'indent' : [ 'error' , 2 , { 'SwitchCase' : 1 } ] ,
19
- 'quotes' : [ 'error' , 'single' , { 'allowTemplateLiterals' : true } ] ,
20
- 'object-curly-spacing' : [ 'error' , 'always' ] ,
16
+ '@typescript-eslint/ban-ts-ignore' : [ 'off' ] ,
17
+ '@typescript-eslint/camelcase' : [ 'off' ] ,
18
+ '@typescript-eslint/explicit-function-return-type' : [ 'error' , { 'allowExpressions' : true } ] ,
19
+ '@typescript-eslint/explicit-member-accessibility' : 'error' ,
20
+ '@typescript-eslint/indent' : [ 'error' , 2 , { 'SwitchCase' : 1 } ] ,
21
+ '@typescript-eslint/interface-name-prefix' : [ 'off' ] ,
22
+ '@typescript-eslint/member-delimiter-style' : [ 'error' , { 'multiline' : { 'delimiter' : 'none' } } ] ,
23
+ '@typescript-eslint/member-ordering' : [ 'error' , {
24
+ 'default' : { 'memberTypes' : [
25
+ 'signature' ,
26
+ 'public-field' , // = ["public-static-field", "public-instance-field"]
27
+ 'protected-field' , // = ["protected-static-field", "protected-instance-field"]
28
+ 'private-field' , // = ["private-static-field", "private-instance-field"]
29
+ 'constructor' ,
30
+ 'public-method' , // = ["public-static-method", "public-instance-method"]
31
+ 'protected-method' , // = ["protected-static-method", "protected-instance-method"]
32
+ 'private-method' // = ["private-static-method", "private-instance-method"]
33
+ ] ,
34
+ 'order' : 'alphabetically' }
35
+ } ] ,
36
+ '@typescript-eslint/no-explicit-any' : 'error' ,
37
+ '@typescript-eslint/no-inferrable-types' : [ 'off' ] ,
38
+ '@typescript-eslint/no-unused-vars' : [ 'error' , { 'argsIgnorePattern' : '^_' } ] ,
39
+ '@typescript-eslint/no-use-before-define' : [ 'off' ] ,
40
+ '@typescript-eslint/semi' : [ 'error' , 'always' ] ,
21
41
'array-bracket-spacing' : [ 'error' , 'always' , { 'singleValue' : false } ] ,
22
42
'arrow-body-style' : [ 'error' , 'as-needed' ] ,
23
43
'computed-property-spacing' : [ 'error' , 'never' ] ,
24
- 'no-multiple-empty-lines' : [ 'error' , { 'max' : 1 , 'maxBOF' : 0 } ] ,
25
- 'prefer-arrow-callback' : 'error' ,
26
44
'func-style' : [ 'warn' , 'expression' ] ,
27
- 'no-multi-spaces ' : [ 'error' , { 'ignoreEOLComments ' : false } ] ,
45
+ 'indent ' : [ 'error' , 2 , { 'SwitchCase ' : 1 } ] ,
28
46
'keyword-spacing' : 'error' ,
29
- '@typescript-eslint/semi' : [ 'error' , 'always' ] ,
30
- '@typescript-eslint/indent' : [ 'error' , 2 , { 'SwitchCase' : 1 } ] ,
31
- '@typescript-eslint/explicit-function-return-type' : [ 'error' , { 'allowExpressions' : true } ] ,
32
- '@typescript-eslint/member-delimiter-style' : [ 'error' , { 'multiline' : { 'delimiter' : 'none' } } ] ,
33
- '@typescript-eslint/interface-name-prefix' : [ 'off' ] ,
34
- '@typescript-eslint/camelcase' : [ 'off' ] ,
35
- '@typescript-eslint/no-use-before-define' : [ 'off' ] ,
36
- '@typescript-eslint/ban-ts-ignore' : [ 'off' ] ,
37
- '@typescript-eslint/no-inferrable-types' : [ 'off' ] ,
38
- '@typescript-eslint/no-unused-vars' : [ 'error' , { 'argsIgnorePattern' : '^_' } ] ,
39
- '@typescript-eslint/no-explicit-any' : 'error' ,
40
- '@typescript-eslint/explicit-member-accessibility' : 'error'
47
+ 'newline-before-return' : 2 ,
48
+ 'no-console' : 0 ,
49
+ 'no-multi-spaces' : [ 'error' , { 'ignoreEOLComments' : false } ] ,
50
+ 'no-multiple-empty-lines' : [ 'error' , { 'max' : 1 , 'maxBOF' : 0 } ] ,
51
+ 'object-curly-spacing' : [ 'error' , 'always' ] ,
52
+ '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
+ } ]
41
62
}
42
63
} ;
0 commit comments