diff --git a/packages/eslint-config-airbnb/package.json b/packages/eslint-config-airbnb/package.json index 46726747..0f688ca6 100644 --- a/packages/eslint-config-airbnb/package.json +++ b/packages/eslint-config-airbnb/package.json @@ -53,7 +53,7 @@ "eslint": "^3.9.1", "eslint-find-rules": "^1.14.3", "eslint-plugin-import": "^2.1.0", - "eslint-plugin-jsx-a11y": "^2.2.3", + "eslint-plugin-jsx-a11y": "^3.0.1", "eslint-plugin-react": "^6.6.0", "in-publish": "^2.0.0", "react": ">= 0.13.0", @@ -62,7 +62,7 @@ }, "peerDependencies": { "eslint": "^3.9.1", - "eslint-plugin-jsx-a11y": "^2.2.3", + "eslint-plugin-jsx-a11y": "^3.0.1", "eslint-plugin-import": "^2.1.0", "eslint-plugin-react": "^6.6.0" }, diff --git a/packages/eslint-config-airbnb/rules/react-a11y.js b/packages/eslint-config-airbnb/rules/react-a11y.js index 1df39103..b101a93e 100644 --- a/packages/eslint-config-airbnb/rules/react-a11y.js +++ b/packages/eslint-config-airbnb/rules/react-a11y.js @@ -9,7 +9,7 @@ module.exports = { rules: { // Enforce that anchors have content // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/anchor-has-content.md - 'jsx-a11y/anchor-has-content': ['error', ['']], + 'jsx-a11y/anchor-has-content': ['error', { components: [''] }], // Require ARIA roles to be valid and non-abstract // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-role.md @@ -30,7 +30,7 @@ module.exports = { // disallow href "#" // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/href-no-hash.md - 'jsx-a11y/href-no-hash': ['error', ['a']], + 'jsx-a11y/href-no-hash': ['error', { components: ['a'] }], // Require to have a non-empty `alt` prop, or role="presentation" // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/img-has-alt.md @@ -42,7 +42,7 @@ module.exports = { // require that JSX labels use "htmlFor" // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/label-has-for.md - 'jsx-a11y/label-has-for': ['error', ['label']], + 'jsx-a11y/label-has-for': ['error', { components: ['label'] }], // require that mouseover/out come with focus/blur, for keyboard-only users // TODO: evaluate @@ -82,7 +82,7 @@ module.exports = { // ensure tags have content and are not aria-hidden // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/heading-has-content.md - 'jsx-a11y/heading-has-content': ['error', ['']], + 'jsx-a11y/heading-has-content': ['error', { components: [''] }], // require HTML elements to have a "lang" prop // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/html-has-lang.md