Skip to content
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

fix: prepare for no-unused-vars #4462

Merged

Conversation

DonIsaac
Copy link
Contributor

Oxlint's no-unused-vars PR will be merged soon. This PR updates oxlint.json to support some limitations of its implementation.

  • @jsx pragmas are not currently recognized as a usage, so createElement has been added to varsIgnorePattern
  • Fragment imports used via <></> syntax is not recognized as a usage, so Fragment has been added to varsIgnorePattern

Note that there are still some unused variables and catch parameters that, when no-unused-vars gets merged, will cause lint CI to fail.

Oxlint's [no-unused-vars](oxc-project/oxc#4445) PR will
be merged soon. This PR updates `oxlint.json` to support some limitations of its
implementation.

- `@jsx` pragmas are not currently recognized as a usage, so `createElement` has
  been added to `varsIgnorePattern`
- `Fragment` imports used via `<></>` syntax is not recognized as a usage, so
  `Fragment` has been added to `varsIgnorePattern`

Note that there are still some unused variables and catch parameters that, when
`no-unused-vars` gets merged, will cause lint CI to fail.
@coveralls
Copy link

Coverage Status

coverage: 99.486%. remained the same
when pulling 3b26fc8 on DonIsaac:don/fix/no-unused-vars-preparation
into 9351588 on preactjs:main.

Copy link
Member

@marvinhagemeister marvinhagemeister left a comment

Choose a reason for hiding this comment

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

Sweet, thanks for updating the lint config in advance! Really appreciated!

@marvinhagemeister marvinhagemeister merged commit 7dc5703 into preactjs:main Jul 31, 2024
2 checks passed
@trigaten
Copy link

trigaten commented Jul 31, 2024

Woo! Ah this isnt the big one yet.

@DonIsaac DonIsaac deleted the don/fix/no-unused-vars-preparation branch August 2, 2024 04:14
@JoviDeCroock JoviDeCroock mentioned this pull request Aug 12, 2024
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.

4 participants