41 lines
983 B
JavaScript
41 lines
983 B
JavaScript
import { dirname } from "path";
|
|
import { fileURLToPath } from "url";
|
|
import { FlatCompat } from "@eslint/eslintrc";
|
|
|
|
const __filename = fileURLToPath(import.meta.url);
|
|
const __dirname = dirname(__filename);
|
|
|
|
const compat = new FlatCompat({
|
|
baseDirectory: __dirname,
|
|
});
|
|
|
|
const eslintConfig = [
|
|
...compat.extends(
|
|
"next/core-web-vitals",
|
|
"next/typescript",
|
|
"plugin:prettier/recommended" // ← Prettier 統合
|
|
),
|
|
{
|
|
rules: {
|
|
//"@typescript-eslint/no-explicit-any": "off",
|
|
"@typescript-eslint/no-unused-vars": "warn",
|
|
"@typescript-eslint/no-unnecessary-type-constraint": "warn",
|
|
"react-hooks/exhaustive-deps": "warn",
|
|
"prettier/prettier": "warn", // ← Prettier エラーを警告扱いに
|
|
},
|
|
},
|
|
{
|
|
ignores: [
|
|
"**/node_modules/**",
|
|
"**/.next/**",
|
|
"**/out/**",
|
|
"**/build/**",
|
|
"**/next-env.d.ts",
|
|
"**/src/generated/**", // ← ワイルドカードを前に追加してみる
|
|
"**/backup/**",
|
|
],
|
|
},
|
|
];
|
|
|
|
export default eslintConfig;
|