Skip to content

fix: sort plugin length for rename#9

Merged
antfu merged 1 commit intoantfu:mainfrom
hyoban:3-9-rename-sort-length
Mar 9, 2026
Merged

fix: sort plugin length for rename#9
antfu merged 1 commit intoantfu:mainfrom
hyoban:3-9-rename-sort-length

Conversation

@hyoban
Copy link
Contributor

@hyoban hyoban commented Mar 8, 2026

  • <- Keep this line and put an x between the brackts.

Description

  {
    "no-console": "off",
-   "react-dom/no-dangerously-set-innerhtml": "error",
-   "react-naming-convention/component-name": "error",
-   "react-rsc/no-client-hook-in-server-component": "error",
-   "react-web-api/no-leaked-event-listener": "error",
    "react/debug/jsx": "error",
+   "react/dom/no-dangerously-set-innerhtml": "error",
+   "react/naming-convention/component-name": "error",
    "react/no-access-state-in-setstate": "error",
+   "react/rsc/no-client-hook-in-server-component": "error",
+   "react/web-api/no-leaked-event-listener": "error",
  }

Linked Issues

fixes #

Additional context

@antfu
Copy link
Owner

antfu commented Mar 9, 2026

I am not sure if I understand what is this fixing?

@hyoban
Copy link
Contributor Author

hyoban commented Mar 9, 2026

When renaming plugins that share a common prefix, the rules can mistakenly be applied to the wrong plugin. For instance, @eslint-react/rsc/xxx should become react-rsc/xxx rather than react/rsc/xxx. Currently, this issue may occur because of premature matching, leading to incorrect modifications.

@antfu antfu merged commit 9ff0dba into antfu:main Mar 9, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants