40 lines
1.4 KiB
JavaScript
40 lines
1.4 KiB
JavaScript
import { defineConfig, globalIgnores } from "eslint/config";
|
|
import nextVitals from "eslint-config-next/core-web-vitals";
|
|
import nextTs from "eslint-config-next/typescript";
|
|
import tailwindCanonicalClasses from "eslint-plugin-tailwind-canonical-classes";
|
|
|
|
const eslintConfig = defineConfig([
|
|
...nextVitals,
|
|
...nextTs,
|
|
...tailwindCanonicalClasses.configs["flat/recommended"],
|
|
{
|
|
rules: {
|
|
"tailwind-canonical-classes/tailwind-canonical-classes": [
|
|
"warn",
|
|
{
|
|
cssPath: "./app/globals.css",
|
|
},
|
|
],
|
|
// unknownAtRules
|
|
"tailwindcss/unknown-at-rules": ["off"],
|
|
// TanStack Table and other libs known to be incompatible with React Compiler memoization
|
|
"react-hooks/incompatible-library": ["off"],
|
|
// This rule is overly strict and causes false positives with async data fetching in useEffect
|
|
"react-hooks/set-state-in-effect": ["off"],
|
|
},
|
|
},
|
|
// Override default ignores of eslint-config-next.
|
|
globalIgnores([
|
|
// Default ignores of eslint-config-next:
|
|
".next/**",
|
|
"out/**",
|
|
"build/**",
|
|
"next-env.d.ts",
|
|
// Python virtual environment and external packages
|
|
"**/.venv/**",
|
|
"**/node_modules/**",
|
|
]),
|
|
]);
|
|
|
|
export default eslintConfig;
|