Files
pasargad/eslint.config.mjs
T

31 lines
971 B
JavaScript
Raw Normal View History

2025-05-31 13:17:46 +03:30
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"),
{
extends: [
'plugin:prettier/recommended',
'plugin:jsx-a11y/recommended', // Add this line
],
rules: {
// Example: Enforce using `const` for variables that are never reassigned
'prefer-const': 'error',
// Example: Disallow unused variables (already often included in recommended configs, but shown for illustration)
'no-unused-vars': ['warn', { 'args': 'none' }],
// Example: Disable a rule if it conflicts with your style or Prettier (less common after plugin:prettier/recommended)
// 'indent': 'off',
},
},
];
export default eslintConfig;