Files
nobat724_front/eslint.config.mjs
T
hamedandClaude Fable 5 374a9d5350 chore: replace removed next lint with eslint flat config
- next lint removed in Next 16; add eslint@9 + eslint-config-next@16
- flat config imports eslint-config-next/core-web-vitals directly
- add typescript devDep (required by eslint-config-next@16)
- demote high-frequency pre-existing rule violations to warn

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 09:57:30 +03:30

26 lines
887 B
JavaScript

import next from 'eslint-config-next/core-web-vitals';
const eslintConfig = [
...next,
{
ignores: ['.next/**', 'node_modules/**', 'public/**'],
},
{
// قوانین پرتکراری که با ارتقا به eslint-config-next@16 / react-hooks@7 سخت‌گیرتر شدند
// و در کد موجود نقض می‌شوند؛ برای عبور از ارتقا به warn تنزل داده شده‌اند.
// پاک‌سازی این warningها خارج از scope این ارتقاست.
rules: {
'react/jsx-key': 'warn',
'react-hooks/set-state-in-effect': 'warn',
'react-hooks/exhaustive-deps': 'warn',
'react-hooks/refs': 'warn',
'react-hooks/purity': 'warn',
'react-hooks/immutability': 'warn',
'jsx-a11y/alt-text': 'warn',
'@next/next/no-img-element': 'warn',
},
},
];
export default eslintConfig;