Javascript: jsx-a11y breaks linter

Created on 21 Nov 2016  路  6Comments  路  Source: airbnb/javascript

Hi there!

I got the following errors for the following rules:

  • jsx-a11y/anchor-has-content
  • jsx-a11y/href-no-hash
  • jsx-a11y/label-has-for
  • jsx-a11y/heading-has-content

They are all type errors. I've removed the rules, and my linter started working again.

For those who want to fix their linter, see below. I wasn't sure what the expected behavior was for those rules, so I didn't attempt to fix the rules. I opted to remove them instead.
https://gist.github.com/johntran/26eb28be5ed30edde5f706525245324c

Setup:
OS: Mac OS X 10.11.6
Atom: 1.12.5
Node: 7.1.0

Atom Packages:
linter-eslint: 8.0.0
Nuclide: 0.183.0

npm packages:
babel-eslint: 7.1.1
eslint-plugin-jsx-a11y: 3.0.1
eslint-config-airbnb: 13.0.0
eslint: 3.10.2

See screenshots. I enabled "linter" atom package to get these screenshots. I disabled "linter" afterwards and Nuclide Diagnostics started picking up eslint errors again.

screenshot 2016-11-21 05 16 00
screenshot 2016-11-21 05 17 14
screenshot 2016-11-21 05 18 45
screenshot 2016-11-21 05 26 44

Most helpful comment

@johntran you are referring to a commit that is beyond eslint-config-airbnb: 13.0.0 version that it looks like you are using.

Please refer to 13.0.0 tag commit.

Current version 13.0.0 supports "eslint-plugin-jsx-a11y": "^2.2.3".

So downgrade your version of eslint-plugin-jsx-a11y to 2.2.3 for now and wait for the next release of eslint-config-airbnb

All 6 comments

@johntran you are referring to a commit that is beyond eslint-config-airbnb: 13.0.0 version that it looks like you are using.

Please refer to 13.0.0 tag commit.

Current version 13.0.0 supports "eslint-plugin-jsx-a11y": "^2.2.3".

So downgrade your version of eslint-plugin-jsx-a11y to 2.2.3 for now and wait for the next release of eslint-config-airbnb

Got it :) Closing.

@johntran please use the install command in the readme of eslint-config-airbnb, and your peer dep versions will always be correct.

Just published v14.0.0 of the main config, and v11.0.1 of the base config.

(#1162, #1166, #1182, #1186, #1207, #1212, #1222)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ryankask picture ryankask  路  3Comments

stephenkingsley picture stephenkingsley  路  3Comments

kozhevnikov picture kozhevnikov  路  3Comments

tunnckoCore picture tunnckoCore  路  3Comments

weihongyu12 picture weihongyu12  路  3Comments