Skip to content

Commit

Permalink
💪 Some rule reconfigurations
Browse files Browse the repository at this point in the history
- Allow JSX props spreading now
- Turn on jsx-a11y/click-events-have-key-events
  • Loading branch information
himynameisdave committed Mar 20, 2020
1 parent 2fea3e2 commit ad0f5f9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions rules/jsx-a11y/on.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion rules/react/on.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit ad0f5f9

Please sign in to comment.