1
+ module . exports = {
2
+ parser : '@typescript-eslint/parser' ,
3
+ plugins : [
4
+ '@typescript-eslint' ,
5
+ 'import' ,
6
+ ] ,
7
+ extends : [
8
+ 'plugin:@typescript-eslint/eslint-recommended' ,
9
+ 'plugin:@typescript-eslint/recommended' ,
10
+ 'plugin:jest/recommended' ,
11
+ 'prettier/@typescript-eslint' ,
12
+ 'prettier/react' ,
13
+ 'plugin:prettier/recommended' ,
14
+ ] ,
15
+ settings : {
16
+ 'import/resolver' : {
17
+ typescript : {
18
+ project : [ 'tsconfig.json' , 'tsconfig.spec.json' ] ,
19
+ } ,
20
+ node : {
21
+ extensions : [ '.ts' , '.tsx' , '.js' , '.jsx' ] ,
22
+ } ,
23
+ } ,
24
+ 'import/ignore' : [ '\\.coffee$' , '\\.(scss|less|css)$' , '\\.(svg|png|jpe?g|webp|gif)(\\?.*)?$' ] ,
25
+ } ,
26
+ globals : {
27
+ window : true ,
28
+ document : true ,
29
+ process : true ,
30
+ __DEV__ : true ,
31
+ __SERVER__ : true ,
32
+ } ,
33
+ parserOptions : {
34
+ sourceType : 'module' ,
35
+ jsx : true ,
36
+ useJSXTextNode : true ,
37
+ ecmaVersion : 2020 ,
38
+ ecmaFeatures : {
39
+ jsx : true ,
40
+ } ,
41
+ } ,
42
+ env : {
43
+ es6 : true ,
44
+ browser : true ,
45
+ node : true ,
46
+ jest : true ,
47
+ } ,
48
+ rules : {
49
+ 'jest/valid-title' : 0 ,
50
+ 'no-confusing-arrow' : 0 ,
51
+ '@typescript-eslint/indent' : 0 ,
52
+ 'operator-linebreak' : 0 ,
53
+ 'function-paren-newline' : 0 ,
54
+ 'no-param-reassign' : 0 ,
55
+ 'comma-dangle' : 0 ,
56
+ 'object-curly-newline' : 0 ,
57
+ 'implicit-arrow-linebreak' : 0 ,
58
+ 'import/prefer-default-export' : 0 ,
59
+ 'class-methods-use-this' : 0 ,
60
+ 'lines-between-class-members' : 0 ,
61
+ 'quote-props' : 0 ,
62
+ 'indent' : 0 ,
63
+ 'no-nested-ternary' : 0 ,
64
+ 'spaced-comment' : [ 'error' , 'always' , { markers : [ '#region' , '#endregion' , '/' ] } ] ,
65
+ 'max-len' : [ 'error' , { code : 140 , ignoreUrls : true } ] ,
66
+ 'import/no-extraneous-dependencies' : 0 ,
67
+ 'no-unused-vars' : [
68
+ 'warn' ,
69
+ {
70
+ argsIgnorePattern : '^(_|[A-Z]+)' ,
71
+ varsIgnorePattern : '^(_|[A-Z]+)' ,
72
+ } ,
73
+ ] ,
74
+ 'import/extensions' : [
75
+ 'error' ,
76
+ 'ignorePackages' ,
77
+ {
78
+ js : 'never' ,
79
+ jsx : 'never' ,
80
+ ts : 'never' ,
81
+ tsx : 'never' ,
82
+ } ,
83
+ ] ,
84
+ 'prettier/prettier' : [
85
+ 'error' ,
86
+ {
87
+ parser : 'typescript' ,
88
+ printWidth : 140 ,
89
+ singleQuote : true ,
90
+ useTabs : false ,
91
+ tabWidth : 2 ,
92
+ semi : true ,
93
+ bracketSpacing : true ,
94
+ trailingComma : 'all' ,
95
+ arrowParens : 'always' ,
96
+ insertPragma : true ,
97
+ quoteProps : 'consistent' ,
98
+ jsxSingleQuote : false ,
99
+ jsxBracketSameLine : false ,
100
+ htmlWhitespaceSensivity : 'css' ,
101
+ proseWrap : 'never' ,
102
+ } ,
103
+ ] ,
104
+ 'no-empty-function' : 0 ,
105
+ 'no-shadow' : 'off' ,
106
+ '@typescript-eslint/no-shadow' : [ 'error' ] ,
107
+ '@typescript-eslint/no-explicit-any' : 'warn' ,
108
+ '@typescript-eslint/no-unused-vars' : [
109
+ 'warn' ,
110
+ {
111
+ argsIgnorePattern : '^(_|[A-Z]+)' ,
112
+ varsIgnorePattern : '^(_|[A-Z]+)' ,
113
+ } ,
114
+ ] ,
115
+ 'react/require-default-props' : 0 ,
116
+ 'react/jsx-curly-newline' : 0 ,
117
+ 'no-use-before-define' : 0 ,
118
+ 'jsx-a11y/anchor-is-valid' : 0 ,
119
+ 'no-useless-constructor' : 0 ,
120
+ 'react/jsx-one-expression-per-line' : 0 ,
121
+ 'react/jsx-wrap-multilines' : 0 ,
122
+ 'react/prop-types' : 0 ,
123
+ 'react/static-property-placement' : 0 ,
124
+ 'react/jsx-filename-extension' : [ 1 , { extensions : [ '.js' , '.jsx' , '.tsx' , '.ts' ] } ] ,
125
+ 'react/jsx-props-no-spreading' : 0 ,
126
+ // '@typescript-eslint/no-var-requires': 0,
127
+ } ,
128
+ } ;
129
+
0 commit comments