Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add custom devDep pattern for import/no-extraneous-dependencies #29

Merged
merged 1 commit into from Apr 2, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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,
},
],
},
};