Rel1cx / eslint-react

A series of composable ESLint plugins for libraries and frameworks that use React as a UI runtime.
https://eslint-react.xyz
MIT License
255 stars 12 forks source link

[Roadmap] Milestone 3.0 (Draft) #335

Open Rel1cx opened 9 months ago

Rel1cx commented 9 months ago

Milestone 3.0 (Draft)

Plugins (with ecological niche explanation)

Additional context

Rules in eslint-plugin-react-dom-a11y (port Svelte's Accessibility warnings)

Rule Description
accesskey Enforce no accesskey on element.
aria-activedescendant-has-tabindex Enforce aria-activedescendant has tabindex.
aria-props Enforce valid aria-* props.
autofocus Enforce no autofocus on element.
click-events-have-key-events Enforce elements with click handlers must have key handlers.
distracting-elements Enforce no distracting elements.
hidden Enforce no hidden on element.
img-redundant-alt Enforce img alt attribute does not contain the word image, picture, or photo.
incorrect-aria-attribute-type Enforce correct aria-* attribute type.
invalid-attribute Enforce no invalid attribute.
interactive-supports-focus Enforce interactive elements support focus.
label-has-associated-control Enforce label has associated control.
media-has-caption Enforce media elements have captions.
misplaced-role Enforce no misplaced role.
misplaced-scope Enforce no misplaced scope.
missing-attribute Enforce that attributes required for accessibility are present on an element.
missing-content Enforce that heading elements (h1, h2, etc.) and anchors have content and that the content is accessible to screen readers.
mouse-events-have-key-events Enforce elements with mouse handlers must have key handlers.
no-redundant-roles Enforce no redundant roles.
no-interactive-element-to-noninteractive-role Enforce no interactive element to non-interactive role.
no-noninteractive-element-interactions Enforce no non-interactive element interactions.
no-noninteractive-element-to-interactive-role Enforce no non-interactive element to interactive role.
no-noninteractive-tabindex Enforce no non-interactive tabindex.
no-static-element-interactions Enforce no static element interactions.
positive-tabindex Enforce no positive tabindex property values.
role-has-required-aria-props Enforce role has required aria-* props.
role-supports-aria-props Enforce role supports aria-* props.
structure Enforce correct structure.
unknown-aria-attribute Enforce no unknown aria-* attribute.
unknown-role Enforce no unknown role.
karlhorky commented 1 month ago
  • eslint-plugin-react-dom-a11y

Exciting! Maybe this could be considered a replacement for eslint-plugin-jsx-a11y? Would be great to be able to move off of this plugin too.

If this fits the goals of the ESLint React project, maybe it would also be good to consider additional rules from the eslint-plugin-jsx-a11y rules

Rel1cx commented 1 week ago
  • eslint-plugin-react-dom-a11y

Exciting! Maybe this could be considered a replacement for eslint-plugin-jsx-a11y? Would be great to be able to move off of this plugin too.

If this fits the goals of the ESLint React project, maybe it would also be good to consider additional rules from the eslint-plugin-jsx-a11y rules

The e18e community has launched a new plugin eslint-plugin-jsx-a11y-x, which seems to meet the need for a replacement for eslint-plugin-jsx-a11y. As for eslint-react, if needed, we may consider continuing to migrate Svelte's Accessibility warnings as an alternative, but the priority will be lower.

rikisamurai commented 6 days ago

Hi! Recently, I've been migrating from eslint-plugin-react to @eslint-react/eslint-plugin and find its rules very useful. However, I've noticed that that they don't seem to support fixable. Are there any plans to add fixable support in future updates?

Rel1cx commented 3 days ago

Hi! Recently, I've been migrating from eslint-plugin-react to @eslint-react/eslint-plugin and find its rules very useful. However, I've noticed that that they don't seem to support fixable. Are there any plans to add fixable support in future updates?

Thank you for trying out this new ESLint plugin. In fact, we are in the process of adding fixable support, so please follow the updates in the recent versions.