@@ -30,6 +30,7 @@ module.exports = {
3030 node : true ,
3131 browser : true ,
3232 jest : true ,
33+ 'jest/globals' : true ,
3334 } ,
3435
3536 extends : [
@@ -294,6 +295,9 @@ module.exports = {
294295 'react/prefer-stateless-function' : 'error' ,
295296 'react/react-in-jsx-scope' : 'error' ,
296297 'react/self-closing-comp' : 'error' ,
298+ 'react/display-name' : 'warn' ,
299+ // Jest rules
300+ 'jest/no-conditional-expect' : 0 ,
297301 } ,
298302
299303 plugins : [ 'import' , 'prefer-object-spread' , '@typescript-eslint' ] ,
@@ -310,14 +314,18 @@ module.exports = {
310314 } ,
311315 } ,
312316 {
317+ excludedFiles : [ '**/cypress/**/*.{js,ts}' ] ,
313318 files : [
314- 'packages/{*graphql-*,graphiql}/src/**' ,
315319 '**/__{tests,mocks}__/*.{js,jsx,ts,tsx}' ,
320+ '**/*.spec.{ts,js.jsx.tsx}' ,
316321 ] ,
317322 extends : [ 'plugin:jest/recommended' ] ,
318323 env : {
319324 'jest/globals' : true ,
320325 } ,
326+ rules : {
327+ 'jest/no-conditional-expect' : 0 ,
328+ } ,
321329 } ,
322330 // Rules for TypeScript only
323331 {
@@ -326,28 +334,6 @@ module.exports = {
326334 'no-unused-vars' : 'off' ,
327335 } ,
328336 } ,
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- } ,
351337 {
352338 // Converted from 'dependencies' options in ancient config
353339 files : [ '**/spec/**' , '**/sample-*/**' ] ,
0 commit comments