From 1666ed495a330b28f33e9bd5afdc65e2297017e2 Mon Sep 17 00:00:00 2001 From: Darkingtail <1603774836@qq.com> Date: Tue, 3 Mar 2026 15:51:21 +0800 Subject: [PATCH] fix: disable react-in-jsx-scope rule in oxlint config After #8677 replaced ESLint with OxLint, the react-in-jsx-scope rule was not disabled. This causes all commits touching JSX files to fail the pre-commit hook (oxlint --deny-warnings). React 17+ uses automatic JSX runtime so explicit React imports are not required. Fixes #8681 --- .oxlintrc.json | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/.oxlintrc.json b/.oxlintrc.json index 156569ec5df..83ab91d8e38 100644 --- a/.oxlintrc.json +++ b/.oxlintrc.json @@ -34,16 +34,20 @@ "storybook-static/**" ], "rules": { + "react/react-in-jsx-scope": "off", "react/prop-types": "off", "unicorn/filename-case": "off", "unicorn/no-null": "off", "unicorn/prevent-abbreviations": "off", - "no-unused-vars": ["warn", { - "argsIgnorePattern": "^_", - "varsIgnorePattern": "^_", - "caughtErrorsIgnorePattern": "^_", - "destructuredArrayIgnorePattern": "^_", - "ignoreRestSiblings": true - }] + "no-unused-vars": [ + "warn", + { + "argsIgnorePattern": "^_", + "varsIgnorePattern": "^_", + "caughtErrorsIgnorePattern": "^_", + "destructuredArrayIgnorePattern": "^_", + "ignoreRestSiblings": true + } + ] } }