37 lines
996 B
JavaScript
37 lines
996 B
JavaScript
import nextPlugin from "@next/eslint-plugin-next";
|
|
import reactPlugin from "eslint-plugin-react";
|
|
import hooksPlugin from "eslint-plugin-react-hooks";
|
|
import tseslint from "typescript-eslint";
|
|
|
|
export default [
|
|
{
|
|
ignores: ["node_modules/**", ".next/**", "out/**", "build/**"],
|
|
},
|
|
...tseslint.configs.recommended,
|
|
{
|
|
files: ["**/*.{js,jsx,ts,tsx}"],
|
|
plugins: {
|
|
"@next/next": nextPlugin,
|
|
react: reactPlugin,
|
|
"react-hooks": hooksPlugin,
|
|
},
|
|
rules: {
|
|
...nextPlugin.configs.recommended.rules,
|
|
...nextPlugin.configs["core-web-vitals"].rules,
|
|
"react/react-in-jsx-scope": "off",
|
|
"react-hooks/rules-of-hooks": "error",
|
|
"react-hooks/exhaustive-deps": "warn",
|
|
"@typescript-eslint/no-unused-vars": [
|
|
"warn",
|
|
{ argsIgnorePattern: "^_", varsIgnorePattern: "^_" },
|
|
],
|
|
"@typescript-eslint/no-explicit-any": "warn",
|
|
},
|
|
settings: {
|
|
react: {
|
|
version: "detect",
|
|
},
|
|
},
|
|
},
|
|
];
|