@@ -30,6 +30,7 @@ module.exports = {
30
30
node : true ,
31
31
browser : true ,
32
32
jest : true ,
33
+ 'jest/globals' : true ,
33
34
} ,
34
35
35
36
extends : [
@@ -294,6 +295,9 @@ module.exports = {
294
295
'react/prefer-stateless-function' : 'error' ,
295
296
'react/react-in-jsx-scope' : 'error' ,
296
297
'react/self-closing-comp' : 'error' ,
298
+ 'react/display-name' : 'warn' ,
299
+ // Jest rules
300
+ 'jest/no-conditional-expect' : 0 ,
297
301
} ,
298
302
299
303
plugins : [ 'import' , 'prefer-object-spread' , '@typescript-eslint' ] ,
@@ -310,14 +314,18 @@ module.exports = {
310
314
} ,
311
315
} ,
312
316
{
317
+ excludedFiles : [ '**/cypress/**/*.{js,ts}' ] ,
313
318
files : [
314
- 'packages/{*graphql-*,graphiql}/src/**' ,
315
319
'**/__{tests,mocks}__/*.{js,jsx,ts,tsx}' ,
320
+ '**/*.spec.{ts,js.jsx.tsx}' ,
316
321
] ,
317
322
extends : [ 'plugin:jest/recommended' ] ,
318
323
env : {
319
324
'jest/globals' : true ,
320
325
} ,
326
+ rules : {
327
+ 'jest/no-conditional-expect' : 0 ,
328
+ } ,
321
329
} ,
322
330
// Rules for TypeScript only
323
331
{
@@ -326,28 +334,6 @@ module.exports = {
326
334
'no-unused-vars' : 'off' ,
327
335
} ,
328
336
} ,
329
- // Rules for Babel & Flow only
330
- {
331
- files : [ 'packages/codemirror-graphql/src/**/*.js' ] ,
332
- parser : 'babel-eslint' ,
333
- plugins : [ 'flowtype' , 'babel' ] ,
334
- rules : {
335
- // flowtype (https://github.com/gajus/eslint-plugin-flowtype)
336
- 'flowtype/boolean-style' : 1 ,
337
- 'flowtype/define-flow-type' : 1 ,
338
- 'flowtype/no-dupe-keys' : 0 ,
339
- 'flowtype/no-primitive-constructor-types' : 1 ,
340
- 'flowtype/no-weak-types' : 0 ,
341
- 'flowtype/require-parameter-type' : 0 ,
342
- 'flowtype/require-return-type' : 0 ,
343
- 'flowtype/require-valid-file-annotation' : 0 ,
344
- 'flowtype/require-variable-type' : 0 ,
345
- 'flowtype/sort-keys' : 0 ,
346
- 'flowtype/type-id-match' : 0 ,
347
- 'flowtype/use-flow-type' : 1 ,
348
- 'flowtype/valid-syntax' : 0 ,
349
- } ,
350
- } ,
351
337
{
352
338
// Converted from 'dependencies' options in ancient config
353
339
files : [ '**/spec/**' , '**/sample-*/**' ] ,
0 commit comments