@@ -25,6 +25,33 @@ module.exports = {
2525 'newlines-between' : 'never' ,
2626 } ,
2727 ] ,
28+ // Here we override airbnb default with our repos dev patterns
29+ // https://github.com/airbnb/javascript/blob/81157eec2309449b31f36bf8940493623f2530c6/packages/eslint-config-airbnb-base/rules/imports.js#L71
30+ 'import/no-extraneous-dependencies' : [
31+ 'error' ,
32+ {
33+ devDependencies : [
34+ '**/.jest/**' ,
35+ '**/.storybook/**' ,
36+ 'test/**' , // tape, common npm pattern
37+ 'tests/**' , // also common npm pattern
38+ 'spec/**' , // mocha, rspec-like pattern
39+ '**/__tests__/**' , // jest pattern
40+ '**/__mocks__/**' , // jest pattern
41+ '**/__stories__/**' , // stories pattern
42+ 'test.{js,jsx}' , // repos with a single test file
43+ 'test-*.{js,jsx}' , // repos with multiple top-level test files
44+ '**/*{.,_}{test,spec}.{js,jsx}' , // tests where the extension or filename suffix denotes that it is a test
45+ '**/jest.config.{js,ts,mjs,mts}' , // jest config
46+ '**/jest.setup.{js,ts,mjs,mts}' , // jest setup
47+ '**/webpack.config.{js,ts,mjs,mts}' , // webpack config
48+ '**/webpack.config.*.{js,ts,mjs,mts}' , // webpack config
49+ '**/rollup.config.{js,ts,mjs,mts}' , // rollup config
50+ '**/rollup.config.*.{js,ts,mjs,mts}' , // rollup config
51+ ] ,
52+ optionalDependencies : false ,
53+ } ,
54+ ] ,
2855 // We allow named and default export
2956 'import/prefer-default-export' : 'off' ,
3057 // This allows us to reenable ForOfStatement.
0 commit comments