Files
recipe_tool/eslint.config.mjs
2026-04-18 23:52:15 +08:00

34 lines
1005 B
JavaScript

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:
".next/**",
"out/**",
"build/**",
"next-env.d.ts",
]),
]);
export default eslintConfig;