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
- [Fix] `eslint` peerDep should not include breaking changes. — committed to airbnb/javascript by ljharb 8 years ago
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?
Released as https://www.npmjs.com/package/eslint-config-airbnb-base, v1.0.0.
@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.
See https://github.com/airbnb/javascript/pull/829 for a solution.
I suggested solution in sibling issue #588, but will duplicate it here:
I’m suggesting to eslint-config-airbnb in three packages:
/base
will becomeeslint-config-airbnb
with removed/legacy
inside/legacy
will becomeeslint-config-airbnb-legacy
eslint
will becomeeslint-config-airbnb-react
, extended byeslint-config-airbnb
witheslint-plugin-react
in deps. (not sure eslint will pickupeslint-plugin-react
from here, but it should)so every consumer will get proper amount of rules and deps