Files

46 lines
1.0 KiB
JavaScript
Raw Permalink Normal View History

import globals from "globals"
import nextPlugin from "@next/eslint-plugin-next"
import prettier from "eslint-config-prettier/flat"
import tseslint from "typescript-eslint"
export default [
{
ignores: [".next/**", "out/**", "build/**", "next-env.d.ts"],
},
{
files: ["**/*.{js,mjs,cjs,ts,tsx,jsx}"],
languageOptions: {
ecmaVersion: "latest",
sourceType: "module",
globals: {
...globals.browser,
...globals.nodeBuiltin,
},
},
},
nextPlugin.flatConfig.coreWebVitals,
...tseslint.configs.recommended,
prettier,
{
rules: {
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-unused-vars": [
"error",
{
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
},
],
"@typescript-eslint/consistent-type-imports": [
"error",
{
prefer: "type-imports",
},
],
"no-console": ["warn", { allow: ["warn", "error"] }],
"prefer-const": "error",
"no-var": "error",
},
},
]