@@ -37,7 +37,7 @@ module.exports = {
37
37
]
38
38
}
39
39
} ,
40
- plugins : [ 'babel' , 'jsx-a11y' , 'react' , 'enact' ] ,
40
+ plugins : [ '@ babel' , 'jsx-a11y' , 'react' , 'enact' ] ,
41
41
settings : {
42
42
react : {
43
43
'pragma' : 'React' , // Pragma to use, default to "React"
@@ -74,8 +74,8 @@ module.exports = {
74
74
'no-label-var' : 'error' ,
75
75
'no-labels' : 'error' ,
76
76
'no-mixed-spaces-and-tabs' : [ 'warn' , 'smart-tabs' ] ,
77
- 'no-native-reassign ' : 'error' ,
78
- 'no-negated-in-lhs ' : 'error' ,
77
+ 'no-global-assign ' : 'error' ,
78
+ 'no-unsafe-negation ' : 'error' ,
79
79
'no-new-func' : 'error' ,
80
80
'no-new-object' : 'warn' ,
81
81
'no-new-wrappers' : 'warn' ,
@@ -172,12 +172,12 @@ module.exports = {
172
172
'react/jsx-uses-react' : 'off' ,
173
173
'react/jsx-uses-vars' : 'warn' ,
174
174
175
- // babel plugin https://github.com/babel/eslint-plugin-babel
176
- 'babel/new-cap' : [ 'error' , {
175
+ // babel plugin https://github.com/babel/babel/tree/main/ eslint/babel-eslint-plugin
176
+ '@ babel/new-cap' : [ 'error' , {
177
177
newIsCap : true ,
178
178
capIsNew : false
179
179
} ] ,
180
- 'babel/no-unused-expressions' : 'warn' ,
180
+ '@ babel/no-unused-expressions' : 'warn' ,
181
181
182
182
// enact plugin https://github.com/enactjs/eslint-plugin-enact/
183
183
'enact/no-module-exports-import' : 'error'
@@ -232,25 +232,46 @@ module.exports = {
232
232
// Jest unit tests
233
233
files : [
234
234
'**/__tests__/**/*.{js,jsx,ts,tsx}' ,
235
- '**/?(*.) +(spec|test).[jt]s?(x) ' ,
235
+ '**/*. +(spec|test).{js,jsx,ts,tsx} ' ,
236
236
'**/*-specs.{js,jsx,ts,tsx}'
237
237
] ,
238
- plugins : [ 'testing-library' ] ,
238
+ plugins : [ 'jest' , ' testing-library'] ,
239
239
excludedFiles : [ 'tests/screenshot/**/*' , 'tests/ui/**/*' ] ,
240
240
env : {
241
- jest : true
241
+ ' jest/globals' : true
242
242
} ,
243
243
rules : {
244
244
// Arrow functions can simplify tests
245
245
'react/jsx-no-bind' : 'off' ,
246
246
247
- // https://github.com/testing-library/eslint-plugin-testing-library
247
+ // jest plugin https://github.com/jest-community/eslint-plugin-jest
248
+ 'jest/no-conditional-expect' : 'warn' ,
249
+ 'jest/no-identical-title' : 'warn' ,
250
+ 'jest/no-jest-import' : 'warn' ,
251
+ 'jest/valid-describe-callback' : 'warn' ,
252
+ 'jest/valid-expect' : 'warn' ,
253
+ 'jest/valid-expect-in-promise' : 'warn' ,
254
+ 'jest/valid-title' : 'warn' ,
255
+
256
+ // testing library plugin https://github.com/testing-library/eslint-plugin-testing-library
248
257
'testing-library/await-async-query' : 'error' ,
249
258
'testing-library/await-async-utils' : 'error' ,
250
259
'testing-library/no-await-sync-query' : 'warn' ,
251
260
'testing-library/no-dom-import' : [ 'error' , 'react' ] ,
261
+ 'testing-library/no-container' : 'warn' ,
262
+ 'testing-library/no-debugging-utils' : 'warn' ,
263
+ 'testing-library/no-promise-in-fire-event' : 'warn' ,
264
+ 'testing-library/no-render-in-setup' : 'warn' ,
265
+ 'testing-library/no-unnecessary-act' : 'warn' ,
252
266
'testing-library/no-wait-for-empty-callback' : 'error' ,
267
+ 'testing-library/no-wait-for-multiple-assertions' : 'warn' ,
268
+ 'testing-library/no-wait-for-side-effects' : 'warn' ,
253
269
'testing-library/no-wait-for-snapshot' : 'error' ,
270
+ 'testing-library/prefer-find-by' : 'warn' ,
271
+ 'testing-library/prefer-presence-queries' : 'warn' ,
272
+ 'testing-library/prefer-query-by-disappearance' : 'warn' ,
273
+ 'testing-library/prefer-screen-queries' : 'error' ,
274
+ 'testing-library/render-result-naming-convention' : 'warn'
254
275
}
255
276
} ,
256
277
{
0 commit comments