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

Conversation

gavinsharp
Copy link
Contributor

import/no-extraneous-dependencies is an ESLint rule that is intended to ensure that you don't import libraries installed as devDependencies from inside non-dev code. It needs to be configured with glob patterns to let it know which files should be considered "dev-only".

Several of our projects have had to set up custom overrides of the this rule because the default config (configured in eslint-config-airbnb-base) was not aware of these dev-only files. This is an attempt to centralize those exceptions so that each project doesn't have to roll their own. Specifically, I am adding:

  • '.storybook/**' and 'stories/**' (Storybook files used in Linoleum)
  • **/setupTests.js (Create React App test setup file, used in web apps)
  • **/*.config.js (misc. config files used throughout our apps, including Webpack, Rollup, Babel, ESLint, postcss, etc.)

Since we are overriding the rule definition from eslint-config-airbnb-base, I also needed to copy the test file patterns we use from their rule set.

@gavinsharp gavinsharp merged commit cfa4c3d into master Apr 2, 2020
@gavinsharp gavinsharp deleted the update_no_extraneous_deps_config branch April 2, 2020 03:23
@github-actions
Copy link

github-actions bot commented Apr 2, 2020

🎉 This PR is included in version 1.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant