Error: "Configuration for rule "react/jsx-sort-props" is invalid"
See original GitHub issueOkay so just tried to update some packages, including some eslint
-related stuff and shock-of-shocks it broke stuff… So I removed everything (rm -rf /node_modules
, cleared out devDependencies
in package.json
), thinking I’d just re-install everything from scratch using this dumb long-ass command npm i -D eslint eslint-config-airbnb eslint-plugin-import eslint-plugin-react eslint-plugin-jsx-a11y
. Still broken (because I assume it tried to install the updated versions)… looks like something in the React package maybe?
Trying to use this as an eslint
config is actually stupid though. The number of times I’ve installed all this shit using the above command, only to have it throw errors is extremely frustrating. It’s dependants should just be included and I shouldn’t have to install all this extra bullshit just to use it. I understand the thinking behind it (what if not everyone wants the whole kitchen sink right) but clearly wider developer ergonomics were not a priority in designing this. Anyone have an alternative solution/one eslint
config file will all the rules in it?
Anyway, for now I guess I’ll just revert to whatever versions I was using before and just never update anything because who knows what might break tomorrow ¯__(ツ)__/¯
Issue Analytics
- State:
- Created 7 years ago
- Reactions:2
- Comments:6
Top GitHub Comments
To install the config properly, please make sure to use the command in the readme that automatically installs the right peer dep versions for you (although I think you’ve got the right ones already).
As far as your complaints about peer deps and descendants, I agree, but that’s how eslint works - there is no way to avoid it short of changes in eslint itself.
Typically, these errors arise from editors using the global eslint instead of the local one - but your stack trace implies it’s using the local one, so I’m not really sure.
Have you restarted your editor after updating node_modules? Most editors cache things such that
npm install
while they’re still open will break them.Restarting Atom solved the issue! Will try this next time I’m getting issues, and will maybe even file an issue over there instead!
Thank you sir! 👏