eslint-tek
v0.3.0
Published
Run one ESLint rule exactly as your config defines it — fast.
Maintainers
Readme
eslint-tek
Run a single ESLint rule across your codebase — exactly as your config defines it. Fast.
tek (Turkish) = single, one. That's the idea: one rule, full speed.
tek's selling point is config fidelity. A rule scoped to certain folders stays scoped,
warn stays warn, and your plugins, custom rules, parser, and eslint-disable comments all apply —
tek just runs only that rule, in parallel.
Plain eslint can't do that: --rule '<json>' overrides globally (it lints files your
config never enabled the rule for), and --no-config-lookup isolates one rule by throwing
your config away. --concurrency adds the speed but still runs every configured rule.
Prior art: eslint-focus and eslint-nibble tackled adjacent problems.
Install
npm install -D eslint-tekRequires ESLint 9 or 10, and Node.js >= 22.13.
Usage
# Run a single rule on your codebase
npx eslint-tek no-console src/
# Plugin rules work too
npx eslint-tek react-hooks/exhaustive-deps src/
# Only lint files changed vs main branch
npx eslint-tek no-console src/ --diff main
# Autofix
npx eslint-tek no-console src/ --fix
# Autofix with type filter
npx eslint-tek no-console src/ --fix --fix-type suggestion
# JSON output for CI
npx eslint-tek no-console src/ --format json
# Suppress warnings
npx eslint-tek no-console src/ --quietOutput
Example:
$ npx eslint-tek react-hooks/exhaustive-deps src/
src/hooks/useData.ts:34:8 React Hook useCallback has missing dependencies
1 file | 1 issue | 1 fixable
Scanned 412 files in 3.2s (4 workers)Options
| Flag | Description |
| ------------------------- | ------------------------------------------------------------------------------------ |
| --fix | Apply autofixes for the target rule |
| --fix-type <types> | Restrict fix types (comma-separated): problem, suggestion, layout |
| --diff [base] | Only lint git-changed files (default base: HEAD) |
| --workers <n> | Max worker thread count (default: half the CPU count). tek uses fewer for small runs |
| --format <fmt> | Output format: text (default), json |
| --ext <exts> | File extensions, comma-separated (default: js,jsx,ts,tsx,mjs,mts,cjs,cts) |
| --config <path> | ESLint config file override |
| --cache | Reuse ESLint's cache for much faster repeat runs |
| --cache-location <path> | Cache base path (default: .eslintcache). tek writes <path>.<rule>.<worker> |
| --quiet | Only show errors, suppress warnings |
Behavior
- File selection: tek discovers files with
git ls-files, so it honors.gitignore(unlikeeslint ., which only honors its own config ignores);tinyglobbyis used outside git repos. - Config fidelity: if the rule isn't enabled, tek says so instead of reporting
nothing, and warnings-only runs exit 0. Same contract as
eslint.
Why It's Fast
The speed comes from a few architectural decisions, not a custom lint engine:
- Parallel: N worker threads with independent ESLint instances (eslint-focus/nibble are single-threaded)
- Surgical: ESLint's
ruleFiltercallback skips all rules except the target (eslint-nibble runs every rule) - Reused instances: One ESLint per worker, reused across files (eslint-focus creates one per file)
- Single-pass fix:
--fixruns one lint pass (nibble's interactive autofix re-lints — 3 passes total)
License
MIT
