Skip to content

Bump eslint-plugin-jsx-a11y to 6.7.1 #395

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Feb 6, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,5 +93,8 @@ This config will be interpreted in the following way:

#### Accessibility-focused rules (prefixed with a11y)

- [No Generic Link Text](./docs/rules/a11y-no-generic-link-text.md)
- [Role Supports ARIA Props](./docs/rules/role-supports-aria-props.md)

##### Deprecated

- [No Generic Link Text](./docs/rules/a11y-no-generic-link-text.md)
4 changes: 3 additions & 1 deletion docs/rules/a11y-no-generic-link-text.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# No Generic Link Text
# No Generic Link Text [Deprecated]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📣 Any "best practice" or existing practice for deprecating a rule? I've just marked the rule as deprecated and removed it from the config.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think if github/a11y-no-generic-link-text has been completely removed form the code base then you could just delete this document altogether!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh okay! I haven't removed the code yet. For this immediate release I will keep it marked as deprecated, then delete it entirely in follow-ups.


_This rule has been deprecated in favor of `anchor-ambiguous-text` in `eslint-plugin-jsx-a11y`._

## Rule Details

Expand Down
10 changes: 8 additions & 2 deletions lib/configs/react.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,14 @@ module.exports = {
plugins: ['github', 'jsx-a11y'],
extends: ['plugin:jsx-a11y/recommended'],
rules: {
'github/a11y-no-generic-link-text': 'error',
'jsx-a11y/role-supports-aria-props': 'off', // Override with github/role-supports-aria-props until https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/issues/910 is resolved
'github/role-supports-aria-props': 'error',
'jsx-a11y/role-supports-aria-props': 'off',
'jsx-a11y/no-aria-hidden-on-focusable': 'error',
'jsx-a11y/anchor-ambiguous-text': [
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This rule replaces our a11y-no-generic-link-text. We need to explicitly enable it because its part of the jsx-a11y/strict ruleset.

Maybe we want to enable the strict ruleset but I don't know, I think we need to review it.

'error',
{
words: ['this', 'more', 'read here', 'read more'],
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rules in addition to the defaults.

anchor-ambiguous-text rule options

},
],
},
}
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"eslint-plugin-filenames": "^1.3.2",
"eslint-plugin-i18n-text": "^1.0.1",
"eslint-plugin-import": "^2.25.2",
"eslint-plugin-jsx-a11y": "^6.6.0",
"eslint-plugin-jsx-a11y": "^6.7.1",
"eslint-plugin-no-only-tests": "^3.0.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-rule-documentation": ">=1.0.0",
Expand Down