javascript: npm@3 warn missing eslint-plugin-react a non react project

Seems like eslint-plugin-react was moved to peer dependency, and now I’m getting

├── UNMET PEER DEPENDENCY eslint-plugin-react@^4.0.0

I’m using eslint-config-airbnb/base, for a non react project.

How can I get rid of this warning without installing eslint-plugin-react? Is there any plan for splitting /base to a separate package?

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 11
  • Comments: 37 (7 by maintainers)

Commits related to this issue

Most upvoted comments

It looks like v7.0.0 added another peerDependency of eslint-plugin-jsx-a11y.

This isn’t mentioned in the README.md, but I’m assuming that this is also only necessary if you are in a React project so it is another useless thing that has to be installed for non-React projects.

Any word on when the separate package that doesn’t have all the React stuff is going to be published?

@josmardias you want "sourceType": "script" i believe - but yes, the legacy config is likely what you want.

@Arcanemagus the readme is now updated, but yes, your assumption is correct.

No update since https://github.com/airbnb/javascript/issues/751#issuecomment-203081106.

I suggested solution in sibling issue #588, but will duplicate it here:

I’m suggesting to eslint-config-airbnb in three packages:

  • /base will become eslint-config-airbnb with removed /legacy inside
  • /legacy will become eslint-config-airbnb-legacy
  • eslint will become eslint-config-airbnb-react, extended by eslint-config-airbnb with eslint-plugin-react in deps. (not sure eslint will pickup eslint-plugin-react from here, but it should)

so every consumer will get proper amount of rules and deps