Skip to content

Commit

Permalink
fix: updated URLs for ESLint rules
Browse files Browse the repository at this point in the history
Signed-off-by: prisis <d.bannert@anolilab.de>
  • Loading branch information
prisis committed Aug 30, 2023
1 parent f8fbd16 commit e6edc33
Showing 1 changed file with 34 additions and 34 deletions.
68 changes: 34 additions & 34 deletions packages/eslint-config/src/config/plugins/jsx-a11y.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const config: Linter.Config = createConfig("jsx_and_tsx", {
"jsx-a11y/accessible-emoji": "off",

// Require ARIA roles to be valid and non-abstract
// https://github.com/devsenexx/eslint-plugin-jsx-a11y/blob/main/docs/rules/rules/alt-text.md
// https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/alt-text.md
"jsx-a11y/alt-text": [
"error",
{
Expand All @@ -29,11 +29,11 @@ const config: Linter.Config = createConfig("jsx_and_tsx", {
],

// Enforce all aria-* props are valid.
// https://github.com/devsenexx/eslint-plugin-jsx-a11y/blob/main/docs/rules/rules/anchor-has-content.md
// https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/anchor-has-content.md
"jsx-a11y/anchor-has-content": ["error", { components: [] }],

// Enforce ARIA state and property values are valid.
// https://github.com/devsenexx/eslint-plugin-jsx-a11y/blob/main/docs/rules/rules/anchor-is-valid.md
// https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/anchor-is-valid.md
"jsx-a11y/anchor-is-valid": [
"error",
{
Expand All @@ -45,24 +45,24 @@ const config: Linter.Config = createConfig("jsx_and_tsx", {

// Enforce that elements that do not support ARIA roles, states, and
// properties do not have those attributes.
// https://github.com/devsenexx/eslint-plugin-jsx-a11y/blob/main/docs/rules/rules/aria-activedescendant-has-tabindex.md
// https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/aria-activedescendant-has-tabindex.md
"jsx-a11y/aria-activedescendant-has-tabindex": "error",

// Enforce that all elements that require alternative text have meaningful information
// https://github.com/devsenexx/eslint-plugin-jsx-a11y/blob/main/docs/rules/rules/aria-props.md
// https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/aria-props.md
"jsx-a11y/aria-props": "error",

// Prevent img alt text from containing redundant words like "image", "picture", or "photo"
// https://github.com/devsenexx/eslint-plugin-jsx-a11y/blob/main/docs/rules/rules/aria-proptypes.md
// https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/aria-proptypes.md
"jsx-a11y/aria-proptypes": "error",

// require that JSX labels use "htmlFor"
// https://github.com/devsenexx/eslint-plugin-jsx-a11y/blob/main/docs/rules/rules/label-has-for.md
// https://github.com/devsenexx/eslint-plugin-jsx-a11y/blob/main/docs/rules/rules/aria-role.md
// https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/label-has-for.md
// https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/aria-role.md
"jsx-a11y/aria-role": ["error", { ignoreNonDOM: false }],

// Enforce that a label tag has a text label and an associated control.
// https://github.com/devsenexx/eslint-plugin-jsx-a11y/blob/main/docs/rules/rules/aria-unsupported-elements.md
// https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/aria-unsupported-elements.md
"jsx-a11y/aria-unsupported-elements": "error",

// Enforce that a control (an interactive element) has a text label.
Expand All @@ -75,11 +75,11 @@ const config: Linter.Config = createConfig("jsx_and_tsx", {
],

// require that mouseover/out come with focus/blur, for keyboard-only users
// https://github.com/devsenexx/eslint-plugin-jsx-a11y/blob/main/docs/rules/rules/click-events-have-key-events.md
// https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/click-events-have-key-events.md
"jsx-a11y/click-events-have-key-events": "error",

// Prevent use of `accessKey`
// https://github.com/devsenexx/eslint-plugin-jsx-a11y/blob/main/docs/rules/rules/control-has-associated-label.md
// https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/control-has-associated-label.md
"jsx-a11y/control-has-associated-label": [
"error",
{
Expand All @@ -92,25 +92,25 @@ const config: Linter.Config = createConfig("jsx_and_tsx", {
],

// require onBlur instead of onChange
// https://github.com/devsenexx/eslint-plugin-jsx-a11y/blob/main/docs/rules/rules/heading-has-content.md
// https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/heading-has-content.md
"jsx-a11y/heading-has-content": ["error", { components: [""] }],

// Elements with an interactive role and interaction handlers must be focusable
// https://github.com/devsenexx/eslint-plugin-jsx-a11y/blob/main/docs/rules/rules/html-has-lang.md
// https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/html-has-lang.md
"jsx-a11y/html-has-lang": "error",

// Enforce that elements with ARIA roles must have all required attributes
// for that role.
// https://github.com/devsenexx/eslint-plugin-jsx-a11y/blob/main/docs/rules/rules/iframe-has-title.md
// https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/iframe-has-title.md
"jsx-a11y/iframe-has-title": "error",

// Enforce that elements with explicit or implicit roles defined contain
// only aria-* properties supported by that role.
// https://github.com/devsenexx/eslint-plugin-jsx-a11y/blob/main/docs/rules/rules/img-redundant-alt.md
// https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/img-redundant-alt.md
"jsx-a11y/img-redundant-alt": "error",

// Enforce tabIndex value is not greater than zero.
// https://github.com/devsenexx/eslint-plugin-jsx-a11y/blob/main/docs/rules/rules/interactive-supports-focus.md
// https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/interactive-supports-focus.md
"jsx-a11y/interactive-supports-focus": "error",

// ensure <hX> tags have content and are not aria-hidden
Expand Down Expand Up @@ -140,11 +140,11 @@ const config: Linter.Config = createConfig("jsx_and_tsx", {
],

// require HTML element's lang prop to be valid
// https://github.com/devsenexx/eslint-plugin-jsx-a11y/blob/main/docs/rules/rules/lang.md
// https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/lang.md
"jsx-a11y/lang": "error",

// prevent distracting elements, like <marquee> and <blink>
// https://github.com/devsenexx/eslint-plugin-jsx-a11y/blob/main/docs/rules/rules/media-has-caption.md
// https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/media-has-caption.md
"jsx-a11y/media-has-caption": [
"error",
{
Expand All @@ -155,19 +155,19 @@ const config: Linter.Config = createConfig("jsx_and_tsx", {
],

// only allow <th> to have the "scope" attr
// https://github.com/devsenexx/eslint-plugin-jsx-a11y/blob/main/docs/rules/rules/mouse-events-have-key-events.md
// https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/mouse-events-have-key-events.md
"jsx-a11y/mouse-events-have-key-events": "error",

// require onClick be accompanied by onKeyUp/onKeyDown/onKeyPress
// https://github.com/devsenexx/eslint-plugin-jsx-a11y/blob/main/docs/rules/rules/no-access-key.md
// https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/no-access-key.md
"jsx-a11y/no-access-key": "error",

// Enforce that DOM elements without semantic behavior not have interaction handlers
// https://github.com/devsenexx/eslint-plugin-jsx-a11y/blob/main/docs/rules/rules/no-autofocus.md
// https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/no-autofocus.md
"jsx-a11y/no-autofocus": ["error", { ignoreNonDOM: true }],

// A non-interactive element does not support event handlers (mouse and key handlers)
// https://github.com/devsenexx/eslint-plugin-jsx-a11y/blob/main/docs/rules/rules/no-distracting-elements.md
// https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/no-distracting-elements.md
"jsx-a11y/no-distracting-elements": [
"error",
{
Expand All @@ -176,8 +176,8 @@ const config: Linter.Config = createConfig("jsx_and_tsx", {
],

// ensure emoji are accessible
// https://github.com/devsenexx/eslint-plugin-jsx-a11y/blob/main/docs/rules/rules/accessible-emoji.md
// https://github.com/devsenexx/eslint-plugin-jsx-a11y/blob/main/docs/rules/rules/no-interactive-element-to-noninteractive-role.md
// https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/accessible-emoji.md
// https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/no-interactive-element-to-noninteractive-role.md
"jsx-a11y/no-interactive-element-to-noninteractive-role": [
"error",
{
Expand All @@ -186,7 +186,7 @@ const config: Linter.Config = createConfig("jsx_and_tsx", {
],

// elements with aria-activedescendant must be tabbable
// https://github.com/devsenexx/eslint-plugin-jsx-a11y/blob/main/docs/rules/rules/no-noninteractive-element-interactions.md
// https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/no-noninteractive-element-interactions.md
"jsx-a11y/no-noninteractive-element-interactions": [
"error",
{
Expand All @@ -195,7 +195,7 @@ const config: Linter.Config = createConfig("jsx_and_tsx", {
],

// ensure iframe elements have a unique title
// https://github.com/devsenexx/eslint-plugin-jsx-a11y/blob/main/docs/rules/rules/no-noninteractive-element-to-interactive-role.md
// https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/no-noninteractive-element-to-interactive-role.md
"jsx-a11y/no-noninteractive-element-to-interactive-role": [
"error",
{
Expand All @@ -208,7 +208,7 @@ const config: Linter.Config = createConfig("jsx_and_tsx", {
],

// prohibit autoFocus prop
// https://github.com/devsenexx/eslint-plugin-jsx-a11y/blob/main/docs/rules/rules/no-noninteractive-tabindex.md
// https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/no-noninteractive-tabindex.md
"jsx-a11y/no-noninteractive-tabindex": [
"error",
{
Expand All @@ -218,15 +218,15 @@ const config: Linter.Config = createConfig("jsx_and_tsx", {
],

// ensure HTML elements do not specify redundant ARIA roles
// https://github.com/devsenexx/eslint-plugin-jsx-a11y/blob/main/docs/rules/rules/no-onchange.md
// https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/no-onchange.md
"jsx-a11y/no-onchange": "off",

// media elements must have captions
// https://github.com/devsenexx/eslint-plugin-jsx-a11y/blob/main/docs/rules/rules/no-redundant-roles.md
// https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/no-redundant-roles.md
"jsx-a11y/no-redundant-roles": "error",

// WAI-ARIA roles should not be used to convert an interactive element to non-interactive
// https://github.com/devsenexx/eslint-plugin-jsx-a11y/blob/main/docs/rules/rules/no-static-element-interactions.md
// https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/no-static-element-interactions.md
"jsx-a11y/no-static-element-interactions": [
"error",
{
Expand All @@ -235,19 +235,19 @@ const config: Linter.Config = createConfig("jsx_and_tsx", {
],

// WAI-ARIA roles should not be used to convert a non-interactive element to interactive
// https://github.com/devsenexx/eslint-plugin-jsx-a11y/blob/main/docs/rules/rules/role-has-required-aria-props.md
// https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/role-has-required-aria-props.md
"jsx-a11y/role-has-required-aria-props": "error",

// Tab key navigation should be limited to elements on the page that can be interacted with.
// https://github.com/devsenexx/eslint-plugin-jsx-a11y/blob/main/docs/rules/rules/role-supports-aria-props.md
// https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/role-supports-aria-props.md
"jsx-a11y/role-supports-aria-props": "error",

// ensure <a> tags are valid
// https://github.com/devsenexx/eslint-plugin-jsx-a11y/blob/main/docs/rules/rules/scope.md
// https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/scope.md
"jsx-a11y/scope": "error",

// Ensure the autocomplete attribute is correct and suitable for the form field it is used with
// https://github.com/devsenexx/eslint-plugin-jsx-a11y/blob/main/docs/rules/rules/tabindex-no-positive.md
// https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/tabindex-no-positive.md
"jsx-a11y/tabindex-no-positive": "error",
},
});
Expand Down

0 comments on commit e6edc33

Please sign in to comment.