Closed jasonrhodes closed 6 years ago
Update: downgrading this back to 5.1.1 also solved the problem. Still not totally sure why.
Because the rule in question was removed in v6. Do you have any reference to that rule in your eslint config? If you ejected from CRA, you may.
Anyone who is using CRA and also keeps their deps up to date (via something like Greenkeeper) is gonna hit this, because ~CRA~ the CRA-packaged eslint config (eslint-config-react-app
) current references the rule and hasn't yet released a version that removes it.
More here: https://github.com/facebook/create-react-app/issues/3418#issuecomment-362839726
Sounds like the incompatibility is that the CRA eslint config doesn’t support v6 of this plugin.
Correct, and peer dependencies are pain and suffering. :)
Peer deps work fine; but tools like greenkeeper sadly don’t yet handle them properly. I’d suggest adding an npm ls
to your tests, which will make greenkeeper’s builds fail when peer dep are invalid.
If you're like me and you found this post because you're experiencing "jsx-a11y/href-no-hash" was not found
due to eslint-config-airbnb
or some other eslint config and you want to update to the latest versions of those eslint configs, you can circumvent the error at the top by placing this in your CRA's .eslintrc
file:
{
"extends": [
"react-app",
"airbnb"
],
"rules": {
"jsx-a11y/href-no-hash": [0],
}
}
work Around
You have to just make some change in .eslintrc file { "rules": { "jsx-a11y/href-no-hash": [0] } } and save if you are using the create react app to build your app and facing this problem.
May be related to #396 but not sure. Greenkeeper just updated a bunch of our dependencies in this PR: https://github.com/SparkPost/2web2ui/pull/264/files, and this plugin went from 5.1.1 to 6.0.3 ... as far as I can tell we don't even use this plugin, it's there because we ejected from CRA a while back and it came "for free".
However, in this PR we have 615 errors because what seems like every single file in our repo errors with this:
The package-lock file only shows one instance of this plugin installed:
My plan is to just remove this plugin from our repo so we can move on, but I wanted to log this here in case it was helpful to anyone else in a similar situation.