43 lines
968 B
JavaScript
43 lines
968 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: {
|
|
"react-hooks/incompatible-library": "off",
|
|
},
|
|
},
|
|
{
|
|
files: ["tests/**/*.ts"],
|
|
languageOptions: {
|
|
globals: {
|
|
describe: "readonly",
|
|
it: "readonly",
|
|
test: "readonly",
|
|
expect: "readonly",
|
|
beforeAll: "readonly",
|
|
afterAll: "readonly",
|
|
beforeEach: "readonly",
|
|
afterEach: "readonly",
|
|
vi: "readonly",
|
|
},
|
|
},
|
|
},
|
|
// Override default ignores of eslint-config-next.
|
|
globalIgnores([
|
|
// Default ignores of eslint-config-next:
|
|
".next/**",
|
|
"out/**",
|
|
"build/**",
|
|
"next-env.d.ts",
|
|
"docs/scripts/**",
|
|
"playwright-report/**",
|
|
"test-results/**",
|
|
]),
|
|
]);
|
|
|
|
export default eslintConfig;
|