Skip to content

Commit

Permalink
Merge pull request #29 from GoProperly/update_no_extraneous_deps_config
Browse files Browse the repository at this point in the history
add custom devDep pattern for import/no-extraneous-dependencies
  • Loading branch information
Gavin Sharp committed Apr 2, 2020
2 parents c91a66b + c79b409 commit cfa4c3d
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions index.js
Expand Up @@ -20,5 +20,28 @@ module.exports = {

// Allow underscore dangles for private members (e.g. this._foo)
'no-underscore-dangle': ['error', { allowAfterThis: true }],

'import/no-extraneous-dependencies': [
'error',
{
devDependencies: [
// Custom patterns for "dev only" files in our code
'.storybook/**', // Storybook
'stories/**', // Storybook
'**/setupTests.js', // CRA Jest setup
'**/*.config.js', // Config files
// The rest of these are copied from eslint-config-airbnb-base:
// https://github.com/airbnb/javascript/blob/0375265cbd43635f8062615995a6a86f22fd0fc2/packages/eslint-config-airbnb-base/rules/imports.js#L71
'test/**',
'tests/**',
'**/__tests__/**',
'**/__mocks__/**',
'test.{js,jsx}',
'test-*.{js,jsx}',
'**/*{.,_}{test,spec}.{js,jsx}',
],
optionalDependencies: false,
},
],
},
};

0 comments on commit cfa4c3d

Please sign in to comment.