From feb069a7d02961a493eb04f6b2b4b6ed34e3f49e Mon Sep 17 00:00:00 2001 From: naiba Date: Tue, 21 Jul 2026 08:58:16 +0000 Subject: [PATCH] chore: migrate lint configuration to Oxlint Co-authored-by: naiba/CloudCode --- .oxlintrc.json | 25 +++++++++++++++++++++++++ eslint.config.js | 27 --------------------------- 2 files changed, 25 insertions(+), 27 deletions(-) create mode 100644 .oxlintrc.json delete mode 100644 eslint.config.js diff --git a/.oxlintrc.json b/.oxlintrc.json new file mode 100644 index 0000000..a695a8d --- /dev/null +++ b/.oxlintrc.json @@ -0,0 +1,25 @@ +{ + "$schema": "./node_modules/oxlint/configuration_schema.json", + "categories": { + "correctness": "error" + }, + "env": { + "browser": true + }, + "ignorePatterns": ["dist"], + "plugins": ["eslint", "typescript", "react"], + "rules": { + "react/rules-of-hooks": "error", + "react/exhaustive-deps": "warn", + "typescript/no-explicit-any": "off", + "react/only-export-components": "off" + }, + "overrides": [ + { + "files": ["tests/e2e/fixtures.ts"], + "rules": { + "react/rules-of-hooks": "off" + } + } + ] +} diff --git a/eslint.config.js b/eslint.config.js deleted file mode 100644 index e8ded56..0000000 --- a/eslint.config.js +++ /dev/null @@ -1,27 +0,0 @@ -import js from "@eslint/js" -import reactHooks from "eslint-plugin-react-hooks" -import reactRefresh from "eslint-plugin-react-refresh" -import globals from "globals" -import tseslint from "typescript-eslint" - -export default tseslint.config( - { ignores: ["dist"] }, - { - extends: [js.configs.recommended, ...tseslint.configs.recommended], - files: ["**/*.{ts,tsx}"], - languageOptions: { - ecmaVersion: 2020, - globals: globals.browser, - }, - plugins: { - "react-hooks": reactHooks, - "react-refresh": reactRefresh, - }, - rules: { - ...reactHooks.configs.recommended.rules, - "@typescript-eslint/no-explicit-any": "off", - "react-refresh/only-export-components": "off", - indent: ["error", 4], - }, - }, -)