From 3b26fc86c956b963d57e5c4e5e1c8477be6d54ea Mon Sep 17 00:00:00 2001 From: Don Isaac Date: Tue, 30 Jul 2024 17:31:04 -0400 Subject: [PATCH] fix: prepare for no-unused-vars Oxlint's [no-unused-vars](https://github.com/oxc-project/oxc/pull/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. --- oxlint.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/oxlint.json b/oxlint.json index bb4c09477e..9a0da7261b 100644 --- a/oxlint.json +++ b/oxlint.json @@ -10,7 +10,8 @@ 2, { "args": "none", - "varsIgnorePattern": "^h|React$" + "caughtErrors": "none", + "varsIgnorePattern": "^h|React|createElement|Fragment$" } ], "typescript/no-namespace": 0,