-
-
Notifications
You must be signed in to change notification settings - Fork 27k
'jsx-a11y/href-no-hash' was not found jsx-a11y/href-no-hash #3418
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
AFAIK this can only happen if you manually added |
@gaearon in 1.0.14 work all fine! =) and i use 4.10 and all works fine! |
Please provide your full |
@gaearon |
That's the problem: "eslint": "^4.10.0",
"eslint-config-airbnb": "^16.1.0",
"eslint-config-prettier": "^2.7.0",
"eslint-plugin-import": "^2.7.0",
"eslint-plugin-jsx-a11y": "^6.0.2",
"eslint-plugin-prettier": "^2.2.0",
"eslint-plugin-react": "^7.4.0", Using custom ESLint configs with CRA projects is not supported and is subject to issues like this. In particular, the difference in |
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. |
This is sort of a bizarre response and reads like "ejecting from CRA is not supported by CRA". That said, this is probably an ESLint problem more than a CRA one. Really really hard to track down, though. |
There's some misunderstanding in this issue. If you look at the original post, OP claims the project wasn't ejected:
Then their package.json looks like it has no relation to CRA at all: "devDependencies": {
"babel-cli": "^6.26.0",
"babel-polyfill": "^6.26.0",
"babel-preset-env": "^1.6.0",
"eslint": "^4.10.0",
"eslint-config-airbnb": "^16.1.0",
"eslint-config-prettier": "^2.7.0",
"eslint-plugin-import": "^2.7.0",
"eslint-plugin-jsx-a11y": "^6.0.2",
"eslint-plugin-prettier": "^2.2.0",
"eslint-plugin-react": "^7.4.0",
"prettier": "^1.7.4"
}, (We don't add So I got confused by this report. |
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. |
@gaearon that makes perfect sense, it wasn't clear from your comment that what you were referencing was the addition of the airbnb config. The thing is, this same problem happens without the airbnb config. I really wish Not sure there's a good fix for this with how peer deps work, but for now we just have to make some kind of note about it and ignore that package when greenkeeper asks us to upgrade, until this config plugin pushes a release that doesn't reference the removed rule. |
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 think it's just a problem with peer deps being "suggestions" ... but yeah maybe GK could read every package's peer dep requirements in and determine if it's ok to upgrade. Everything else you say here is 100% correct and we're all settled now, just hoping to leave some breadcrumbs as anyone who currently uses |
While peer deps are “suggestions”, IMO the only way they can be useful is to specify compatibility ranges. So it would make sense to me if GK respected that. |
They’re not suggestions, they’re requirements; indeed greenkeeper lacks proper peer dep support. Adding |
For those of you not yet able to make it work, I added this on my Cheers 🤙🏻 |
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.17Then, specify:
Steps to Reproduce
(Write your steps here:)
Expected Behavior
No warnings!
Actual Behavior
after update to 1.0.17 warning in all file in project


@#
Reproducible Demo
no
The text was updated successfully, but these errors were encountered: