34 lines
1005 B
JavaScript
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;
|