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

Comments

Projects
None yet
5 participants
@wellyshen

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

This comment has been minimized.

Show comment
Hide comment
@ljharb

ljharb Nov 10, 2016

Member

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.

Member

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 Nov 10, 2016

@msikma

This comment has been minimized.

Show comment
Hide comment
@msikma

msikma 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.

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

This comment has been minimized.

Show comment
Hide comment
@msikma

This comment has been minimized.

Show comment
Hide comment
@msikma

msikma Nov 10, 2016

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

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

This comment has been minimized.

Show comment
Hide comment
@wellyshen

wellyshen Nov 10, 2016

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

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

@ljharb

This comment has been minimized.

Show comment
Hide comment
@ljharb

ljharb Nov 10, 2016

Member

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

Member

ljharb commented Nov 10, 2016

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

@karolis-inntec

This comment has been minimized.

Show comment
Hide comment
@karolis-inntec

karolis-inntec May 9, 2017

Also this issue looks relevant eslint/eslint#8547

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