chore: migrate lint configuration to Oxlint

Co-authored-by: naiba/CloudCode <hi+cloudcode@nai.ba>
This commit is contained in:
naiba
2026-07-21 08:58:16 +00:00
co-authored by naiba/CloudCode
parent 5ace626f23
commit feb069a7d0
2 changed files with 25 additions and 27 deletions
+25
View File
@@ -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"
}
}
]
}
-27
View File
@@ -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],
},
},
)