Javascript: Error on eslint-config-airbnb v13.0.0

Created on 10 Nov 2016  路  7Comments  路  Source: airbnb/javascript

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.

Most helpful comment

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

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

All 7 comments

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.

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 [email protected] and this complaint:

npm WARN [email protected] 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.

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

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

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

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

Indeed, eslint --init will cause this bug - see eslint issue https://github.com/eslint/eslint/issues/7338.

Also this issue looks relevant https://github.com/eslint/eslint/issues/8547

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ar
mbifulco picture mbifulco  路  3Comments

felixsanz picture felixsanz  路  3Comments

golopot picture golopot  路  3Comments

koiralakiran1 picture koiralakiran1  路  3Comments

brendanvinson picture brendanvinson  路  4Comments