Skip to content

Commit

Permalink
fix: prepare for no-unused-vars
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
DonIsaac committed Jul 30, 2024
1 parent 9351588 commit 3b26fc8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion oxlint.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
2,
{
"args": "none",
"varsIgnorePattern": "^h|React$"
"caughtErrors": "none",
"varsIgnorePattern": "^h|React|createElement|Fragment$"
}
],
"typescript/no-namespace": 0,
Expand Down

0 comments on commit 3b26fc8

Please sign in to comment.