mirror of
https://github.com/robonen/tools.git
synced 2026-03-20 10:54:44 +00:00
952 B
952 B
base preset
Purpose
Базовый quality-профиль для JS/TS-проектов: корректность, анти-паттерны, безопасные дефолты.
Key Rules
eslint/eqeqeq: запрещает==, требует===.eslint/no-unused-vars: запрещает неиспользуемые переменные (кроме_name).eslint/no-eval,eslint/no-var,eslint/prefer-const.unicorn/prefer-node-protocol: требуетnode:для built-in модулей.unicorn/no-thenable: запрещает thenable-объекты.oxc/*correctness правила (bad-comparison-sequence,missing-throwи др.).
Examples
// ✅ Good
import { readFile } from 'node:fs/promises';
const id = 42;
if (id === 42) {
throw new Error('unexpected');
}
// ❌ Bad
import { readFile } from 'fs/promises';
var id = 42;
if (id == '42') {
throw 'unexpected';
}