mirror of
https://github.com/Buriburizaem0n/admin-frontend-domain.git
synced 2026-11-04 16:50:20 +00:00
109 lines
3.4 KiB
JSON
109 lines
3.4 KiB
JSON
{
|
|
"$schema": "./node_modules/oxlint/configuration_schema.json",
|
|
"categories": {
|
|
"correctness": "error"
|
|
},
|
|
"env": {
|
|
"browser": true
|
|
},
|
|
"ignorePatterns": ["dist"],
|
|
"plugins": ["eslint", "typescript", "react"],
|
|
"rules": {
|
|
"no-case-declarations": "error",
|
|
"no-empty": "error",
|
|
"no-fallthrough": "error",
|
|
"no-prototype-builtins": "error",
|
|
"no-regex-spaces": "error",
|
|
"no-unexpected-multiline": "error",
|
|
"no-useless-assignment": "error",
|
|
"preserve-caught-error": "error",
|
|
"no-array-constructor": "error",
|
|
"no-var": "error",
|
|
"prefer-const": "error",
|
|
"prefer-rest-params": "error",
|
|
"prefer-spread": "error",
|
|
"typescript/ban-ts-comment": "error",
|
|
"typescript/no-empty-object-type": "error",
|
|
"typescript/no-namespace": "error",
|
|
"typescript/no-require-imports": "error",
|
|
"typescript/no-unnecessary-type-constraint": "error",
|
|
"typescript/no-unsafe-function-type": "error",
|
|
"react/rules-of-hooks": "error",
|
|
"typescript/no-explicit-any": "off",
|
|
"react/only-export-components": "off",
|
|
// React Compiler lint stays opt-in until the compiler is adopted.
|
|
"react/capitalized-calls": "off",
|
|
"react/error-boundaries": "off",
|
|
"react/exhaustive-effect-dependencies": "off",
|
|
"react/globals": "off",
|
|
"react/hooks": "off",
|
|
"react/immutability": "off",
|
|
"react/incompatible-library": "off",
|
|
"react/invariant": "off",
|
|
"react/memo-dependencies": "off",
|
|
"react/no-deriving-state-in-effects": "off",
|
|
"react/preserve-manual-memoization": "off",
|
|
"react/purity": "off",
|
|
"react/refs": "off",
|
|
"react/rule-suppression": "off",
|
|
"react/set-state-in-effect": "off",
|
|
"react/set-state-in-render": "off",
|
|
"react/static-components": "off",
|
|
"react/syntax": "off",
|
|
"react/todo": "off",
|
|
"react/unsupported-syntax": "off",
|
|
"react/use-memo": "off",
|
|
"react/void-use-memo": "off"
|
|
},
|
|
|
|
|
|
"overrides": [
|
|
{
|
|
"files": [
|
|
"vite.config.ts",
|
|
"vitest.config.ts",
|
|
"playwright.config.ts",
|
|
"postcss.config.js",
|
|
"tailwind.config.js"
|
|
],
|
|
"env": {
|
|
"browser": false,
|
|
"node": true
|
|
}
|
|
},
|
|
{
|
|
"files": ["src/test/**/*.{ts,tsx}"],
|
|
"env": {
|
|
"browser": true,
|
|
"node": true,
|
|
"vitest": true
|
|
}
|
|
},
|
|
{
|
|
"files": ["tests/e2e/**/*.ts"],
|
|
"env": {
|
|
"browser": false,
|
|
"node": true
|
|
}
|
|
},
|
|
{
|
|
"files": [
|
|
"src/components/server-config.tsx",
|
|
"src/components/server-config-batch.tsx",
|
|
"src/routes/server.tsx"
|
|
],
|
|
"rules": {
|
|
// Existing migration debt remains visible without blocking lint.
|
|
"no-useless-assignment": "warn"
|
|
}
|
|
},
|
|
{
|
|
"files": ["tests/e2e/fixtures.ts"],
|
|
"rules": {
|
|
// Playwright fixture callbacks are not React hooks.
|
|
"react/rules-of-hooks": "off"
|
|
}
|
|
}
|
|
]
|
|
}
|