From 62caa5f8212b2e108dbe5d57a44e0ad4aaae55f1 Mon Sep 17 00:00:00 2001 From: Trond Bergquist Date: Tue, 7 Sep 2021 12:58:23 +0200 Subject: [PATCH] eslint-config: set jsx-a11y/accessible-emoji to off From some testing on os x with VoiceOver, it seems the guidance provided in the rule jsx-a11y/accessible-emoji leads to a degraded experience with the label not being announced to the user. See [issue here](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/issues/627) --- src/eslint-config-adeira/CHANGELOG.md | 1 + .../__tests__/__snapshots__/index.test.js.snap | 2 +- .../__tests__/__snapshots__/presets.test.js.snap | 2 +- src/eslint-config-adeira/src/presets/react.js | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/eslint-config-adeira/CHANGELOG.md b/src/eslint-config-adeira/CHANGELOG.md index 277db19067..f2cfbda17c 100644 --- a/src/eslint-config-adeira/CHANGELOG.md +++ b/src/eslint-config-adeira/CHANGELOG.md @@ -1,5 +1,6 @@ # Unreleased +- set `jsx-a11y/accessible-emoji` rule to off, since it is deprecated and creates a degraded experience: [see](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/issues/627) - New rules `@next/next/inline-script-id`, `@next/next/no-script-in-document` and `@next/next/no-script-in-head` enabled (as warnings). For more information visit: https://nextjs.org/docs/basic-features/eslint#eslint-plugin - We clarified what to do when you are using `@adeira/eslint-config/next` preset inside monorepo (check our readme). Basically, you might encounter the following warning: diff --git a/src/eslint-config-adeira/__tests__/__snapshots__/index.test.js.snap b/src/eslint-config-adeira/__tests__/__snapshots__/index.test.js.snap index 0cd66da497..cff564b592 100644 --- a/src/eslint-config-adeira/__tests__/__snapshots__/index.test.js.snap +++ b/src/eslint-config-adeira/__tests__/__snapshots__/index.test.js.snap @@ -366,7 +366,7 @@ Object { "jest/valid-expect": 2, "jest/valid-expect-in-promise": 2, "jest/valid-title": 2, - "jsx-a11y/accessible-emoji": 2, + "jsx-a11y/accessible-emoji": 0, "jsx-a11y/alt-text": 2, "jsx-a11y/anchor-has-content": 2, "jsx-a11y/anchor-is-valid": 2, diff --git a/src/eslint-config-adeira/__tests__/__snapshots__/presets.test.js.snap b/src/eslint-config-adeira/__tests__/__snapshots__/presets.test.js.snap index 65a1a2480c..f391450e2a 100644 --- a/src/eslint-config-adeira/__tests__/__snapshots__/presets.test.js.snap +++ b/src/eslint-config-adeira/__tests__/__snapshots__/presets.test.js.snap @@ -800,7 +800,7 @@ Object { 2, "all", ], - "jsx-a11y/accessible-emoji": 2, + "jsx-a11y/accessible-emoji": 0, "jsx-a11y/alt-text": 2, "jsx-a11y/anchor-has-content": 2, "jsx-a11y/anchor-is-valid": 2, diff --git a/src/eslint-config-adeira/src/presets/react.js b/src/eslint-config-adeira/src/presets/react.js index da18414696..eb7a818059 100644 --- a/src/eslint-config-adeira/src/presets/react.js +++ b/src/eslint-config-adeira/src/presets/react.js @@ -176,7 +176,7 @@ module.exports = ({ 'react-native/split-platform-components': OFF, // React Accessibility (https://github.com/evcohen/eslint-plugin-jsx-a11y) - 'jsx-a11y/accessible-emoji': ERROR, + 'jsx-a11y/accessible-emoji': OFF, 'jsx-a11y/alt-text': ERROR, 'jsx-a11y/anchor-has-content': ERROR, 'jsx-a11y/anchor-is-valid': ERROR,