26 lines
1019 B
JavaScript
26 lines
1019 B
JavaScript
|
|
// eslint.config.mjs
|
||
|
|
import typescriptPlugin from "@typescript-eslint/eslint-plugin";
|
||
|
|
import parser from "@typescript-eslint/parser";
|
||
|
|
|
||
|
|
export default [
|
||
|
|
{
|
||
|
|
ignores: ["dist", "node_modules"], // Исключаем папки из проверки
|
||
|
|
},
|
||
|
|
{
|
||
|
|
files: ["src/**/*.ts"], // Проверяем только TypeScript файлы
|
||
|
|
languageOptions: {
|
||
|
|
parser, // Используем парсер TypeScript
|
||
|
|
ecmaVersion: "latest", // Последняя версия ECMAScript
|
||
|
|
sourceType: "module", // Модули ES
|
||
|
|
},
|
||
|
|
plugins: {
|
||
|
|
"@typescript-eslint": typescriptPlugin, // Используем плагин TypeScript
|
||
|
|
},
|
||
|
|
rules: {
|
||
|
|
"@typescript-eslint/no-unused-vars": ["error"], // Ошибка для неиспользуемых переменных
|
||
|
|
semi: ["error", "always"], // Всегда требовать точку с запятой
|
||
|
|
quotes: ["error", "double"], // Использовать двойные кавычки
|
||
|
|
},
|
||
|
|
},
|
||
|
|
];
|