Skip to content
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

Error on eslint-config-airbnb v13.0.0 #1172

Closed
wellyshen opened this issue Nov 10, 2016 · 7 comments
Closed

Error on eslint-config-airbnb v13.0.0 #1172

wellyshen opened this issue Nov 10, 2016 · 7 comments

Comments

@wellyshen
Copy link

Hi Guys, I have updated my eslint-config-airbnb to v13.0.0, when I run npm test the following error occurs, I have installed "eslint-plugin-jsx-a11y", does anyone meet this problem?

Module build failed: Error: /Users/Welly/Desktop/react-cool-starter/node_modules/eslint-config-airbnb/rules/react-a11y.js:
Configuration for rule "jsx-a11y/anchor-has-content" is invalid:
Value "" is the wrong type.

@ljharb
Copy link
Collaborator

ljharb commented Nov 10, 2016

If you use the install command in the readme, you'd end up with the proper version of all the peer deps- including v2 (not v3) of eslint-plugin-jsx-a11y.

@ljharb ljharb closed this as completed Nov 10, 2016
@msikma
Copy link

msikma commented Nov 10, 2016

There might be a problem in the ESLint website getting started guide. (I presume that's the page you mean by readme, but correct me if I'm wrong.) Or in the installer script, possibly.

I probably have to send this to the ESLint page though, so my apologies if this is in the wrong place.

I've just set up ESLint for a new project which didn't have any kind of linting before, and I ended up with v3 as well. Basically, I installed eslint (which installed v3.9.1), ran ./node_modules/.bin/eslint --init, then chose Airbnb and JSON.

This yields an install of eslint-plugin-jsx-a11y@3.0.1 and this complaint:

npm WARN eslint-config-airbnb@13.0.0 requires a peer of eslint-plugin-jsx-a11y@^2.2.3 but none was installed.

Linting any file produces the same error as reported by @wellyshen, and manually removing jsx-a11y and reinstalling ^2.2.3 fixes the problem.

@gergoerdosi
Copy link
Contributor

Not that one, @ljharb refers to the command here:

https://github.com/airbnb/javascript/tree/master/packages/eslint-config-airbnb#eslint-config-airbnb-1

@msikma
Copy link

msikma commented Nov 10, 2016

In that case I'll take this to ESLint since their out of the box configuration for Airbnb must be broken.

@wellyshen
Copy link
Author

@ljharb Fixed by the command, thanks a lot :)

@ljharb
Copy link
Collaborator

ljharb commented Nov 10, 2016

Indeed, eslint --init will cause this bug - see eslint issue eslint/eslint#7338.

@ghost
Copy link

ghost commented May 9, 2017

Also this issue looks relevant eslint/eslint#8547

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants