bun add -D @exer7um/eslint-configpnpm i -D @exer7um/eslint-confignpm i -D @exer7um/eslint-configyarn add -D @exer7um/eslint-configДля использования нужно создать файл eslint.config.mjs или eslint.config.ts с содержимым:
import createESLintConfig from "@exer7um/eslint-config"
export default createESLintConfig()Добавить в файл .vscode/settings.json:
{
"eslint.validate": ["javascript", "json", "vue", "typescript", "yaml", "github-actions-workflow"]
}Добавить команды для запуска в package.json:
{ "eslint": "eslint --max-warnings=0", "eslint:fix": "eslint --max-warnings=0 --fix" }В функцию createESLintConfig можно передавать параметры для включения/отключения плагинов, а также для управления правилами.
import createESLintConfig from "@exer7um/eslint-config"
export default createESLintConfig({ plugins: { vitest: false } })import createESLintConfig from "@exer7um/eslint-config"
export default createESLintConfig({ rules: { "no-console": "off" } })Дополнительные пути можно добавить в globalIgnores через параметр ignores:
import createESLintConfig from "@exer7um/eslint-config"
export default createESLintConfig({ ignores: ["**/dist/**", "**/coverage/**"] })При использовании React необходимо явно включить соответствующий плагин в конфигурации:
import createESLintConfig from "@exer7um/eslint-config"
export default createESLintConfig({ plugins: { react: true } })