From a6da4bb5b2b7997affe21da6a1bf9487722b53c8 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Tue, 5 Jul 2016 13:36:21 -0700 Subject: [PATCH] [eslint config] [react] [breaking] enable aria rules: - `jsx-a11y/aria-props` - `jsx-a11y/aria-proptypes` - `jsx-a11y/aria-unsupported-elements` - `jsx-a11y/role-has-required-aria-props` - `jsx-a11y/role-supports-aria-props` --- packages/eslint-config-airbnb/rules/react-a11y.js | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/packages/eslint-config-airbnb/rules/react-a11y.js b/packages/eslint-config-airbnb/rules/react-a11y.js index 4b19fd07..bcfc8251 100644 --- a/packages/eslint-config-airbnb/rules/react-a11y.js +++ b/packages/eslint-config-airbnb/rules/react-a11y.js @@ -12,20 +12,17 @@ module.exports = { 'jsx-a11y/aria-role': 2, // Enforce all aria-* props are valid. - // TODO: enable // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-props.md - 'jsx-a11y/aria-props': 0, + 'jsx-a11y/aria-props': 2, // Enforce ARIA state and property values are valid. - // TODO: enable // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-proptypes.md - 'jsx-a11y/aria-proptypes': 0, + 'jsx-a11y/aria-proptypes': 2, // Enforce that elements that do not support ARIA roles, states, and // properties do not have those attributes. - // TODO: enable // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-unsupported-elements.md - 'jsx-a11y/aria-unsupported-elements': 0, + 'jsx-a11y/aria-unsupported-elements': 2, // disallow href "#" // TODO: enable @@ -69,15 +66,13 @@ module.exports = { // Enforce that elements with ARIA roles must have all required attributes // for that role. - // TODO: enable // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/role-has-required-aria-props.md - 'jsx-a11y/role-has-required-aria-props': 0, + 'jsx-a11y/role-has-required-aria-props': 2, // Enforce that elements with explicit or implicit roles defined contain // only aria-* properties supported by that role. - // TODO: enable // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/role-supports-aria-props.md - 'jsx-a11y/role-supports-aria-props': 0, + 'jsx-a11y/role-supports-aria-props': 2, // Enforce tabIndex value is not greater than zero. // TODO: evaluate