create-react-app: 'jsx-a11y/href-no-hash' was not found jsx-a11y/href-no-hash
Is this a bug report?
yes
Can you also reproduce the problem with npm 4.x?
yes
Environment
node -v
: 8.9.0npm -v
: 5.5.1yarn --version
(if you use Yarn): 1.3.2npm ls react-scripts
(if you haven’t ejected): react-scripts@1.0.17
Then, specify:
- Operating system: mac os 10.13.1
- Browser and version (if relevant):
Steps to Reproduce
(Write your steps here:)
- after update
- yarn start
Expected Behavior
No warnings!
Actual Behavior
after update to 1.0.17 warning in all file in project @#
Reproducible Demo
no
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 15 (8 by maintainers)
That’s the problem:
Using custom ESLint configs with CRA projects is not supported and is subject to issues like this. In particular, the difference in
eslint-plugin-jsx-a11y
versions is causing the trouble.Of course if you eject you can customize anything you want.
But you can’t expect that you can take two arbitrary ESLint presets and use them together. If they rely on different versions of plugins, you need to either pick just one of them, or wait for them both to “line up”.
We try to keep up with the updates, but we don’t always match what Airbnb preset uses. If you ejected and prefer Airbnb’s preset, just remove ours.
They’re not suggestions, they’re requirements; indeed greenkeeper lacks proper peer dep support.
Adding
npm ls
to your tests will prevent greenkeeper from thinking invalid deps are passing.For those of you not yet able to make it work, I added this on my
.eslintrc
https://github.com/mmazzarolo/eslint-plugin-react-app/blob/master/README.md#known-issuesCheers 🤙🏻
This sounds like an issue with greenkeeper to me. Out ESLint preset specifies a peer dependency on 5.x of the plugin. The update to 6.x is by definition unsafe if it breaks a peer dependency of a dependency.
We actually did release it as part of the 2.x alpha. You can search issues for “2.x roadmap” and see the installation instructions there. The preset package has been published, it’s just not tagged as stable.
This doesn’t work in ESLint.
I’m confused, does this mean I can’t use eslint with CRA even if I execute it separately with a different config? I need eslint in all my projects for CI purposes and I would prefer not to be able to run a different version of it or at least have a different config using the same version of eslint. In my opinion, a boilerplate should not limit my ability to use a popular tool, and if there’s anything I can do to help I’d be happy to contribute.