Eslint-plugin-jsx-a11y: Configuration for rule "jsx-a11y/label-has-for" is invalid: Value "label" should be object.

Created on 19 Oct 2017  Â·  8Comments  Â·  Source: jsx-eslint/eslint-plugin-jsx-a11y

c:\Users\realtebo\Downloads\manager\node_modules\eslint-config-rallycoding\rules\react-a11y.js: Configuration for rule "jsx-a11y/label-has-for" is invalid: Value "label" should be object. 

Referenced from: c:\Users\realtebo\Downloads\manager\node_modules\eslint-config-rallycoding\index.js 
Referenced from: c:\Users\realtebo\Downloads\manager\.eslintrc

My acutal package.json

  "devDependencies": {
    "eslint": "4.9.0",
    "eslint-config-rallycoding": "^3.2.0",
    "eslint-plugin-import": "2.7.0",
    "eslint-plugin-jsx-a11y": "6.0.2",
    "eslint-plugin-react": "7.4.0",

Most helpful comment

add this lime in eslintrc
"rules": { "jsx-a11y/label-has-for": false }

All 8 comments

What's in your .eslintrc?

I simple extended eslint-rallycoding

It looks like rallycoding is a fork of Airbnb’s config; it’s only recently that airbnb’s config supports v6 of this plugin. I’d file the issue there.

Thanks. While waiting, I manually rollbacked to an older version.

I have the same problem. How do I rollback to an older version?

add this lime in eslintrc
"rules": { "jsx-a11y/label-has-for": false }

@dakdreams I added it but stil get an error:

{
  "extends": "rallycoding",
  "rules": {
    "jsx-a11y/label-has-for": false
  }
}

nicola@Questions$ eslint src/**
/usr/local/lib/node_modules/eslint-config-rallycoding/rules/react-a11y.js:
Configuration for rule "jsx-a11y/label-has-for" is invalid:
Value ["label"] should be object.

Referenced from: /usr/local/lib/node_modules/eslint-config-rallycoding/index.js
Referenced from: /Users/nicola/Questions/.eslintrc
Error: /usr/local/lib/node_modules/eslint-config-rallycoding/rules/react-a11y.js:
Configuration for rule "jsx-a11y/label-has-for" is invalid:
Value ["label"] should be object.

Referenced from: /usr/local/lib/node_modules/eslint-config-rallycoding/index.js
Referenced from: /Users/nicola/Questions/.eslintrc
at validateRuleOptions (/usr/local/lib/node_modules/eslint/lib/config/config-validator.js:119:19)
at Object.keys.forEach.id (/usr/local/lib/node_modules/eslint/lib/config/config-validator.js:162:9)
at Array.forEach ()
at validateRules (/usr/local/lib/node_modules/eslint/lib/config/config-validator.js:161:30)
at Object.validate (/usr/local/lib/node_modules/eslint/lib/config/config-validator.js:239:5)
at loadFromDisk (/usr/local/lib/node_modules/eslint/lib/config/config-file.js:507:19)
at load (/usr/local/lib/node_modules/eslint/lib/config/config-file.js:550:20)
at configExtends.reduceRight (/usr/local/lib/node_modules/eslint/lib/config/config-file.js:421:36)
at Array.reduceRight ()
at applyExtends (/usr/local/lib/node_modules/eslint/lib/config/config-file.js:403:28)
(node:52429) DeprecationWarning: [eslint] The 'ecmaFeatures' config file property is deprecated, and has no effect. (found in /usr/local/lib/node_modules/eslint-config-rallycoding/rules/react.js)
(node:52429) DeprecationWarning: [eslint] The 'ecmaFeatures' config file property is deprecated, and has no effect. (found in /usr/local/lib/node_modules/eslint-config-rallycoding/rules/react-a11y.js)

false isn’t a valid value there; try 0 or ’off’

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mikehwagz picture mikehwagz  Â·  4Comments

zcs19871221 picture zcs19871221  Â·  5Comments

uknmr picture uknmr  Â·  5Comments

Steve-O-Cassels picture Steve-O-Cassels  Â·  5Comments

jessebeach picture jessebeach  Â·  6Comments