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: Configuration for rule "jsx-a11y/anchor-has-content" is invalid #119

Closed
oprogramador opened this Issue Nov 10, 2016 · 1 comment

Comments

Projects
None yet
2 participants
@oprogramador

I get the following error:

.../node_modules/eslint-config-airbnb/rules/react-a11y.js:
	Configuration for rule "jsx-a11y/anchor-has-content" is invalid:
	Value "" is the wrong type.

Referenced from: airbnb
Referenced from: .../.eslintrc
Error: .../node_modules/eslint-config-airbnb/rules/react-a11y.js:
	Configuration for rule "jsx-a11y/anchor-has-content" is invalid:
	Value "" is the wrong type.

Referenced from: airbnb
Referenced from: .../.eslintrc
    at validateRuleOptions (.../node_modules/eslint/lib/config/config-validator.js:115:15)
    at .../node_modules/eslint/lib/config/config-validator.js:162:13
    at Array.forEach (native)
    at Object.validate (.../node_modules/eslint/lib/config/config-validator.js:161:35)
    at load (.../node_modules/eslint/lib/config/config-file.js:522:19)
    at .../node_modules/eslint/lib/config/config-file.js:391:36
    at Array.reduceRight (native)
    at applyExtends (.../node_modules/eslint/lib/config/config-file.js:362:28)
    at load (.../node_modules/eslint/lib/config/config-file.js:529:22)
    at .../node_modules/eslint/lib/config/config-file.js:391:36

for the following content of package.json:

    "eslint": "^3.9.1",
    "eslint-config-airbnb": "^13.0.0",
    "eslint-plugin-import": "^2.2.0",
    "eslint-plugin-jsx-a11y": "^3.0.1",
    "eslint-plugin-react": "^6.6.0",
    "eslint-plugin-sorting": "^0.3.0",

However for version 2.2.3 of eslint-plugin-jsx-a11y it works.

Node version: 6.4.0
NPM version: 3.10.3

My .eslintrc:

{
  "env": {
    "mocha": true,
    "node": true
  },
  "extends": "airbnb",
  "plugins": [
    "sorting"
  ],
  "rules": {
    "class-methods-use-this": "off",
    "import/extensions": "off",
    "import/imports-first": "off",
    "import/no-extraneous-dependencies": "off",
    "max-len": [
      "error",
      120
    ],
    "new-cap": "off",
    "newline-before-return": "error",
    "one-var": [
      "error",
      {
        "initialized": "never"
      }
    ],
    "one-var-declaration-per-line": [
      "error",
      "initializations"
    ],
    "sort-imports": "error",
    "sort-keys": "error",
    "sort-vars": "error"
  }
}
@ljharb

This comment has been minimized.

Show comment
Hide comment
@ljharb

ljharb Nov 10, 2016

Collaborator

@oprogramador this is because the airbnb config explicitly requires 2.x of eslint-plugin-jsx-a11y.

If you install eslint-config-airbnb with the shell command in the readme, you'll get the proper peer dep versions.

Collaborator

ljharb commented Nov 10, 2016

@oprogramador this is because the airbnb config explicitly requires 2.x of eslint-plugin-jsx-a11y.

If you install eslint-config-airbnb with the shell command in the readme, you'll get the proper peer dep versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment