更新安全配置项目
This commit is contained in:
+16
-1
@@ -1,10 +1,25 @@
|
||||
import { defineConfig, globalIgnores } from "eslint/config";
|
||||
import {defineConfig, globalIgnores} from "eslint/config";
|
||||
import nextVitals from "eslint-config-next/core-web-vitals";
|
||||
import nextTs from "eslint-config-next/typescript";
|
||||
|
||||
const eslintConfig = defineConfig([
|
||||
...nextVitals,
|
||||
...nextTs,
|
||||
{
|
||||
rules: {
|
||||
// Allow any type
|
||||
"@typescript-eslint/no-explicit-any": "off",
|
||||
// Allow unused variables with underscore prefix
|
||||
"@typescript-eslint/no-unused-vars": ["warn", { "argsIgnorePattern": "^_" }],
|
||||
// Reduce required type annotations
|
||||
"@typescript-eslint/explicit-function-return-type": "off",
|
||||
"@typescript-eslint/explicit-module-boundary-types": "off",
|
||||
// Allow console logs
|
||||
"no-console": "off",
|
||||
// Reduce strictness
|
||||
"react-hooks/exhaustive-deps": "warn",
|
||||
}
|
||||
},
|
||||
// Override default ignores of eslint-config-next.
|
||||
globalIgnores([
|
||||
// Default ignores of eslint-config-next:
|
||||
|
||||
Reference in New Issue
Block a user