From ad0f5f9f095d03f36db9810cc50937460c231165 Mon Sep 17 00:00:00 2001 From: himynameisdave Date: Fri, 20 Mar 2020 13:24:54 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=AA=20Some=20rule=20reconfigurations?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Allow JSX props spreading now - Turn on jsx-a11y/click-events-have-key-events --- rules/jsx-a11y/on.js | 4 ++-- rules/react/on.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rules/jsx-a11y/on.js b/rules/jsx-a11y/on.js index 25f9097..08eb8c6 100644 --- a/rules/jsx-a11y/on.js +++ b/rules/jsx-a11y/on.js @@ -30,7 +30,7 @@ module.exports = { 'jsx-a11y/aria-unsupported-elements': 'error', // click-events-have-key-events - Enforce a clickable non-interactive element has at least one keyboard event listener. // https://github.com/evcohen/eslint-plugin-jsx-a11y/tree/master/docs/rules/click-events-have-key-events.md - 'jsx-a11y/click-events-have-key-events': 'off', + 'jsx-a11y/click-events-have-key-events': 'error', // heading-has-content - Enforce heading (`h1`, `h2`, etc) elements contain accessible content. // https://github.com/evcohen/eslint-plugin-jsx-a11y/tree/master/docs/rules/heading-has-content.md 'jsx-a11y/heading-has-content': 'error', @@ -60,7 +60,7 @@ module.exports = { 'jsx-a11y/media-has-caption': 'error', // mouse-events-have-key-events - Enforce that `onMouseOver`/`onMouseOut` are accompanied by `onFocus`/`onBlur` for keyboard-only users. // https://github.com/evcohen/eslint-plugin-jsx-a11y/tree/master/docs/rules/mouse-events-have-key-events.md - 'jsx-a11y/mouse-events-have-key-events': 'off', + 'jsx-a11y/mouse-events-have-key-events': 'error', // no-access-key - Enforce that the `accessKey` prop is not used on any element to avoid complications with keyboard commands used by a screenreader. // https://github.com/evcohen/eslint-plugin-jsx-a11y/tree/master/docs/rules/no-access-key.md 'jsx-a11y/no-access-key': 'error', diff --git a/rules/react/on.js b/rules/react/on.js index 71469dc..12fbf06 100644 --- a/rules/react/on.js +++ b/rules/react/on.js @@ -209,7 +209,7 @@ module.exports = { 'react/jsx-curly-newline': 'off', // Disallow JSX props spreading // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-props-no-spreading.md - 'react/jsx-props-no-spreading': 'warn', + 'react/jsx-props-no-spreading': 'off', // For Flow types // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prefer-read-only-props.md 'react/prefer-read-only-props': 'off',