Улучшение конфигурации ESLint: профессиональный подход
- Удален ненужный .eslintignore (файлы уже не существовали) - Настроен ESLint только для нужных папок: src/, prisma/, scripts/ - Добавлены конкретные служебные файлы в ignores вместо паттернов - Более точная и профессиональная настройка линтера 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@ -1,12 +0,0 @@
|
|||||||
node_modules/
|
|
||||||
.next/
|
|
||||||
out/
|
|
||||||
build/
|
|
||||||
dist/
|
|
||||||
*.config.js
|
|
||||||
*.config.ts
|
|
||||||
# Старые файлы, которые не были изменены в этой сессии
|
|
||||||
check-*.js
|
|
||||||
debug-*.js
|
|
||||||
test-*.js
|
|
||||||
show-*.js
|
|
@ -12,13 +12,23 @@ const compat = new FlatCompat({
|
|||||||
const eslintConfig = [
|
const eslintConfig = [
|
||||||
...compat.extends("next/core-web-vitals", "next/typescript"),
|
...compat.extends("next/core-web-vitals", "next/typescript"),
|
||||||
{
|
{
|
||||||
|
// Применяем правила только к папкам с основным кодом
|
||||||
|
files: [
|
||||||
|
"src/**/*.{js,jsx,ts,tsx}",
|
||||||
|
"prisma/**/*.{js,ts}",
|
||||||
|
"scripts/**/*.{js,mjs,ts}"
|
||||||
|
],
|
||||||
ignores: [
|
ignores: [
|
||||||
".next/**/*",
|
".next/**/*",
|
||||||
"node_modules/**/*",
|
"node_modules/**/*",
|
||||||
"build/**/*",
|
"build/**/*",
|
||||||
"dist/**/*",
|
"dist/**/*",
|
||||||
"*.config.js",
|
"*.config.js",
|
||||||
"*.config.mjs"
|
"*.config.mjs",
|
||||||
|
// Игнорируем временные и служебные файлы в корне
|
||||||
|
"diagnostic-script.js",
|
||||||
|
"dev.log",
|
||||||
|
"server.log"
|
||||||
],
|
],
|
||||||
rules: {
|
rules: {
|
||||||
// TypeScript правила
|
// TypeScript правила
|
||||||
|
Reference in New Issue
Block a user