Skip to content

Commit

Permalink
fix: add eslint as a peer dependency
Browse files Browse the repository at this point in the history
This adds eslint as a peer dependency, because otherwise we get some
incompatibilities when installing within a repo. I just tested in
dotcom-debug-user and got some cryptic errors because it wasn't using
the latest version of ESLint.

I didn't consider this when reviewing the original PR :)

By adding a peerDependency of `eslint@8.27.0` we ensure that all the
rules we specify actually exist within the app's installed version of
ESLint. The one that immediately threw an error in dotcom-debug-user
was https://eslint.org/docs/latest/rules/no-new-native-nonconstructor

Peer dependencies are designed for this case. They're meant to be used
when a module _requires_ that it's installed alongside a specific
version of another module. There's a good blog post on the subject here
if not familiar: https://nodejs.org/en/blog/npm/peer-dependencies
  • Loading branch information
rowanmanning committed Apr 19, 2023
1 parent 4512dda commit 78506d6
Show file tree
Hide file tree
Showing 2 changed files with 78 additions and 259 deletions.
Loading

0 comments on commit 78506d6

Please sign in to comment.