1
1
module . exports = {
2
- extends : [ 'airbnb' , 'plugin:@typescript-eslint/recommended' ] ,
3
- parser : '@typescript-eslint/parser' ,
4
- plugins : [ '@typescript-eslint' , 'prettier' ] ,
2
+ extends : [
3
+ 'airbnb-typescript' ,
4
+ 'airbnb/hooks' ,
5
+ 'plugin:@typescript-eslint/recommended' ,
6
+ 'plugin:jest/recommended' ,
7
+ 'plugin:prettier/recommended'
8
+ ] ,
9
+ plugins : [ 'react' , '@typescript-eslint' , 'jest' , 'import' ] ,
5
10
env : {
6
11
browser : true ,
7
- es6 : true
12
+ es6 : true ,
13
+ jest : true ,
8
14
} ,
9
- settings : {
10
- 'import/parsers' : {
11
- '@typescript-eslint/parser' : [ '.ts' , '.tsx' ] ,
12
- } ,
13
- 'import/resolver' : {
14
- typescript : { } ,
15
+ globals : {
16
+ Atomics : 'readonly' ,
17
+ SharedArrayBuffer : 'readonly' ,
18
+ } ,
19
+ parser : '@typescript-eslint/parser' ,
20
+ parserOptions : {
21
+ ecmaFeatures : {
22
+ jsx : true ,
15
23
} ,
24
+ ecmaVersion : 2018 ,
25
+ sourceType : 'module' ,
26
+ project : './tsconfig.json' ,
16
27
} ,
17
28
rules : {
18
- 'react/jsx-filename-extension' : [ 2 , { extensions : [ '.js' , '.jsx' , '.ts' , '.tsx' ] } ] ,
19
- 'import/no-extraneous-dependencies' : [ 2 , { devDependencies : [ '**/test.tsx' , '**/test.ts' ] } ] ,
20
- 'import/extensions' : [ 2 , { ignorePackages : true } ] ,
21
- 'no-nested-ternary' : [ 0 ] ,
22
- indent : [ 2 , 4 , { "SwitchCase" : 1 } ] ,
23
- "arrow-body-style" : [ 1 , 'as-needed' ] ,
24
- 'no-restricted-globals' : [ 1 ] ,
25
- '@typescript-eslint/indent' : [ 2 , 4 ] ,
26
- 'react/jsx-indent' : [ 2 , 4 ] ,
27
- 'react/jsx-tag-spacing' : [ 0 ] ,
28
- '@typescript-eslint/ban-ts-ignore' : [ 0 ] ,
29
- 'import/prefer-default-export' : [ 0 ] ,
30
- 'react/sort-comp' : [ 0 ] ,
31
- "react/destructuring-assignment" : [ 1 , "always" , { "ignoreClassFields" : true } ] ,
32
- 'react/static-property-placement' : [ 1 , 'property assignment' , {
33
- propTypes : "static public field" ,
34
- defaultProps : "static public field"
35
- } ] ,
36
- 'react/state-in-constructor' : [ 0 ] ,
37
- 'react/jsx-indent-props' : [ 2 , 4 ] ,
38
- "object-curly-newline" : [ 0 ] ,
39
- "object-curly-spacing" : [ 0 ] ,
40
- quotes : [ 2 , 'single' ] ,
41
- "comma-dangle" : [ 2 , 'never' ] ,
42
- 'no-param-reassign' : [ 0 ] ,
43
- "max-len" : [ 2 , {
44
- code : 150 ,
45
- comments : 150 ,
46
- ignoreUrls : true
47
- } ] ,
48
- 'react/jsx-props-no-spreading' : [ 2 , {
49
- html : 'enforce' ,
50
- custom : 'ignore' ,
51
- exceptions : [ ]
52
- } ]
29
+ 'linebreak-style' : 'off' ,
30
+ '@typescript-eslint/ban-ts-comment' : 'off' ,
31
+ 'react-hooks/exhaustive-deps' : 1 ,
32
+ '@typescript-eslint/no-shadow' : 1 ,
33
+ '@typescript-eslint/naming-convention' : 1 ,
34
+ 'prettier/prettier' : [
35
+ 'error' ,
36
+ {
37
+ endOfLine : 'auto' ,
38
+ } ,
39
+ ] ,
53
40
} ,
54
- } ;
41
+ } ;
0 commit comments