4
4
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
5
5
*/
6
6
{
7
- "env" : {
8
- "browser" : true ,
9
- "es2021" : true
10
- } ,
11
- "extends" : [
12
- "eslint:recommended" ,
13
- "plugin:@typescript-eslint/recommended" ,
14
- "plugin:jsdoc/recommended-typescript"
15
- ] ,
16
- "parser" : "@typescript-eslint/parser" ,
17
- "parserOptions" : {
18
- "ecmaFeatures" : {
19
- "jsx" : true
20
- } ,
21
- "ecmaVersion" : "latest" ,
22
- "sourceType" : "module"
23
- } ,
24
- "plugins" : [
25
- "@typescript-eslint" ,
26
- "jsdoc"
27
- ] ,
28
- "rules" : {
29
- //https://github.com/typescript-eslint/typescript-eslint/issues/1824, indent is therefore turned off and we use typescript-eslint/indent instead
30
- "indent" : [
31
- "off"
32
- ] ,
33
- "@typescript-eslint/indent" : [
34
- "error" ,
35
- "tab" ,
36
- {
37
- "SwitchCase" : 1
38
- }
39
- ] ,
40
- "@typescript-eslint/no-explicit-any" : "off" ,
41
- "@typescript-eslint/no-inferrable-types" : "off" ,
42
- "no-trailing-spaces" : [
43
- 2
44
- ] ,
45
- "linebreak-style" : [
46
- "error" ,
47
- "unix"
48
- ] ,
49
- "quotes" : [
50
- "error" ,
51
- "single" ,
52
- {
53
- "avoidEscape" : true
54
- }
55
- ] ,
56
- "max-len" : [
57
- "error" ,
58
- {
59
- "code" : 150 ,
60
- "tabWidth" : 0
61
- }
62
- ] ,
63
- "comma-dangle" : [
64
- "error" ,
65
- "never"
66
- ] ,
67
- "arrow-parens" : [
68
- "error" ,
69
- "as-needed"
70
- ]
71
- } ,
72
- "overrides" : [
73
- {
74
- // TODO: Remove this override once these components have been converted to use hooks
75
- "files" : [
76
- "src/client/app/containers/admin/CreateUserContainer.tsx" ,
77
- "src/client/app/containers/csv/UploadCSVContainer.tsx"
78
- ] ,
79
- "extends" : [
80
- "eslint:recommended" ,
81
- "plugin:@typescript-eslint/recommended"
82
- ] ,
83
- "parser" : "@typescript-eslint/parser" ,
84
- "parserOptions" : {
85
- "ecmaFeatures" : {
86
- "jsx" : true
87
- } ,
88
- "ecmaVersion" : "latest" ,
89
- "sourceType" : "module"
90
- } ,
91
- "plugins" : [
92
- "@typescript-eslint"
93
- ] ,
94
- "rules" : {
95
- // only to be used when declaring props as {}.
96
- // is used in conjunction with overrides
97
- // https://eslint.org/docs/user-guide/configuring/configuration-files#configuration-based-on-glob-patterns
98
- "@typescript-eslint/ban-types" : [
99
- "error" ,
100
- {
101
- "extendDefaults" : true ,
102
- "types" : {
103
- "{}" : false
104
- }
105
- }
106
- ] ,
107
- // same rules need to be added.
108
- "indent" : [
109
- "off"
110
- ] ,
111
- "@typescript-eslint/indent" : [
112
- "error" ,
113
- "tab" ,
114
- {
115
- "SwitchCase" : 1
116
- }
117
- ] ,
118
- "@typescript-eslint/no-explicit-any" : "off" ,
119
- "@typescript-eslint/no-inferrable-types" : "off" ,
120
- "no-trailing-spaces" : [
121
- 2
122
- ] ,
123
- "linebreak-style" : [
124
- "error" ,
125
- "unix"
126
- ] ,
127
- "quotes" : [
128
- "error" ,
129
- "single" ,
130
- {
131
- "avoidEscape" : true
132
- }
133
- ] ,
134
- "max-len" : [
135
- "error" ,
136
- {
137
- "code" : 150 ,
138
- "tabWidth" : 0
139
- }
140
- ] ,
141
- "comma-dangle" : [
142
- "error" ,
143
- "never"
144
- ] ,
145
- "arrow-parens" : [
146
- "error" ,
147
- "as-needed"
148
- ]
149
- }
150
- } ,
151
- {
152
- // disable jsdoc requirement for reducers and actions
153
- "files" : [
154
- "src/client/app/reducers/*.ts" ,
155
- "src/client/app/actions/*.ts"
156
- ] ,
157
- "rules" : {
158
- "jsdoc/require-jsdoc" : "off" ,
159
- "jsdoc/require-returns" : "off"
160
- }
161
- } ,
162
- {
163
- // disable jsdoc for containers separately
164
- // jsdoc makes sense for containers but we are working on removing them from the codebase
165
- // TODO: Remove this override once containers have been converted
166
- "files" : [
167
- "src/client/app/containers/*/*" ,
168
- "src/client/app/containers/*"
169
- ] ,
170
- "rules" : {
171
- "jsdoc/require-jsdoc" : "off" ,
172
- "jsdoc/require-returns" : "off" ,
173
- "jsdoc/require-param" : "off"
174
- }
175
- }
176
- ]
177
- }
7
+ "env" : {
8
+ "browser" : true ,
9
+ "es2021" : true
10
+ } ,
11
+ "extends" : [
12
+ "eslint:recommended" ,
13
+ "plugin:@typescript-eslint/recommended" ,
14
+ "plugin:jsdoc/recommended-typescript"
15
+ ] ,
16
+ "parser" : "@typescript-eslint/parser" ,
17
+ "parserOptions" : {
18
+ "ecmaFeatures" : {
19
+ "jsx" : true
20
+ } ,
21
+ "ecmaVersion" : "latest" ,
22
+ "sourceType" : "module"
23
+ } ,
24
+ "plugins" : [
25
+ "@typescript-eslint" ,
26
+ "jsdoc"
27
+ ] ,
28
+ "rules" : {
29
+ //https://github.com/typescript-eslint/typescript-eslint/issues/1824, indent is therefore turned off and we use typescript-eslint/indent instead
30
+ "indent" : [
31
+ "off"
32
+ ] ,
33
+ "@typescript-eslint/indent" : [
34
+ "error" ,
35
+ "tab" ,
36
+ {
37
+ "SwitchCase" : 1
38
+ }
39
+ ] ,
40
+ "@typescript-eslint/no-explicit-any" : "off" ,
41
+ "@typescript-eslint/no-inferrable-types" : "off" ,
42
+ "no-trailing-spaces" : [
43
+ 2
44
+ ] ,
45
+ "linebreak-style" : [
46
+ "error" ,
47
+ "unix"
48
+ ] ,
49
+ "quotes" : [
50
+ "error" ,
51
+ "single" ,
52
+ {
53
+ "avoidEscape" : true
54
+ }
55
+ ] ,
56
+ "max-len" : [
57
+ "error" ,
58
+ {
59
+ "code" : 150 ,
60
+ "tabWidth" : 0
61
+ }
62
+ ] ,
63
+ "comma-dangle" : [
64
+ "error" ,
65
+ "never"
66
+ ] ,
67
+ "arrow-parens" : [
68
+ "error" ,
69
+ "as-needed"
70
+ ]
71
+ } ,
72
+ "overrides" : [
73
+ {
74
+ // TODO: Remove this override once these components have been converted to use hooks
75
+ "files" : [
76
+ "src/client/app/containers/admin/CreateUserContainer.tsx" ,
77
+ "src/client/app/containers/csv/UploadCSVContainer.tsx"
78
+ ] ,
79
+ "extends" : [
80
+ "eslint:recommended" ,
81
+ "plugin:@typescript-eslint/recommended"
82
+ ] ,
83
+ "parser" : "@typescript-eslint/parser" ,
84
+ "parserOptions" : {
85
+ "ecmaFeatures" : {
86
+ "jsx" : true
87
+ } ,
88
+ "ecmaVersion" : "latest" ,
89
+ "sourceType" : "module"
90
+ } ,
91
+ "plugins" : [
92
+ "@typescript-eslint"
93
+ ] ,
94
+ "rules" : {
95
+ // only to be used when declaring props as {}.
96
+ // is used in conjunction with overrides
97
+ // https://eslint.org/docs/user-guide/configuring/configuration-files#configuration-based-on-glob-patterns
98
+ "@typescript-eslint/ban-types" : [
99
+ "error" ,
100
+ {
101
+ "extendDefaults" : true ,
102
+ "types" : {
103
+ "{}" : false
104
+ }
105
+ }
106
+ ] ,
107
+ // same rules need to be added.
108
+ "indent" : [
109
+ "off"
110
+ ] ,
111
+ "@typescript-eslint/indent" : [
112
+ "error" ,
113
+ "tab" ,
114
+ {
115
+ "SwitchCase" : 1
116
+ }
117
+ ] ,
118
+ "@typescript-eslint/no-explicit-any" : "off" ,
119
+ "@typescript-eslint/no-inferrable-types" : "off" ,
120
+ "no-trailing-spaces" : [
121
+ 2
122
+ ] ,
123
+ "linebreak-style" : [
124
+ "error" ,
125
+ "unix"
126
+ ] ,
127
+ "quotes" : [
128
+ "error" ,
129
+ "single" ,
130
+ {
131
+ "avoidEscape" : true
132
+ }
133
+ ] ,
134
+ "max-len" : [
135
+ "error" ,
136
+ {
137
+ "code" : 150 ,
138
+ "tabWidth" : 0
139
+ }
140
+ ] ,
141
+ "comma-dangle" : [
142
+ "error" ,
143
+ "never"
144
+ ] ,
145
+ "arrow-parens" : [
146
+ "error" ,
147
+ "as-needed"
148
+ ]
149
+ }
150
+ } ,
151
+ {
152
+ // disable jsdoc requirement for reducers and actions
153
+ "files" : [
154
+ "src/client/app/reducers/*.ts" ,
155
+ "src/client/app/actions/*.ts"
156
+ ] ,
157
+ "rules" : {
158
+ "jsdoc/require-jsdoc" : "off" ,
159
+ "jsdoc/require-returns" : "off"
160
+ }
161
+ } ,
162
+ {
163
+ // disable jsdoc for containers separately
164
+ // jsdoc makes sense for containers but we are working on removing them from the codebase
165
+ // TODO: Remove this override once containers have been converted
166
+ "files" : [
167
+ "src/client/app/containers/*/*" ,
168
+ "src/client/app/containers/*"
169
+ ] ,
170
+ "rules" : {
171
+ "jsdoc/require-jsdoc" : "off" ,
172
+ "jsdoc/require-returns" : "off" ,
173
+ "jsdoc/require-param" : "off"
174
+ }
175
+ }
176
+ ]
177
+ }
0 commit comments