Lintroll
Batteries-included ESLint with 12+ plugins for TypeScript, Vue, React, JSON, YAML, and Markdown.
CLI
lintroll . # Lint directory
lintroll . --fix # Auto-fix
lintroll . --fix --cache # Fix with caching
lintroll --git . # Only git-tracked files
lintroll --git --fix . # Fix only tracked files
lintroll --staged --fix # Pre-commit hook
lintroll . --node # Enable Node.js rules
lintroll . --node=./scripts # Node.js rules for specific paths
lintroll . --quiet # Errors only (no warnings)
lintroll . --allow-abbreviation db # Allow specific abbreviations
Style Rules
| Rule |
Enforced style |
| Indentation |
Tabs |
| Quotes |
Single |
| Semicolons |
Always |
| Line length |
100 chars max |
| Trailing commas |
Multiline only |
| Functions |
Arrow (except this/arguments/generators/hoisting) |
| Types |
type = over interface |
| Type imports |
Separate import type from value imports |
No any |
Use unknown and narrow |
| Unused vars |
Prefix with _ (e.g. _unused) |
| No abbreviations |
db → database, env → environment, pkg → packageJson |
| Import extensions |
.js not .ts (unless allowImportingTsExtensions: true) |
| React filenames |
PascalCase (UserProfile.tsx) |
Abbreviation Mapping
Common renames enforced by unicorn/prevent-abbreviations:
| Abbreviation |
Full name |
args |
arguments_ (reserved word) |
db |
database |
env |
environment |
pkg |
packageJson |
temp |
temporary |
res |
response |
req |
request |
dir |
directory |
err |
error |
msg |
message |
Loop indices i, j are always allowed. Add more with --allow-abbreviation.
ESLint Config
Zero-config:
// eslint.config.js
export { default } from 'lintroll'
Custom:
// eslint.config.ts
import { defineConfig, pvtnbr } from 'lintroll'
export default defineConfig([
{ ignores: ['tests/fixtures/**/*'] },
...pvtnbr({
node: true,
allowAbbreviations: {
exactWords: ['i', 'j'],
substrings: ['db', 'env']
}
})
])
For full API types, see node_modules/lintroll/dist/index.d.mts.
Auto-Detection
| Feature |
Detection |
| Vue.js |
*.vue files present — rules apply automatically |
| TypeScript |
tsconfig.json present |
| Node.js |
.cjs, .mts, scripts/**, bin entries |
Ignored by Default
node_modules/**, dist/**, vendor/**
package-lock.json, pnpm-lock.yaml
*.min.js, .vitepress
- AI assistant files:
CLAUDE.md, .claude/, copilot.json, .cursorrules
JSON/YAML
- package.json keys auto-sorted:
name → version → description → ... → scripts → dependencies → devDependencies
- JSON style: tabs, trailing commas, spaces around braces
{ "key": "value" }
Gotchas
- Abbreviation rules disabled in
.d.ts — declaration files follow standard conventions
.ts extensions in imports — use .js unless tsconfig has allowImportingTsExtensions: true
- Markdown code blocks in
skills/ directories — automatically ignored (not linted as project code)
1---2name: lintroll3description: Opinionated ESLint configuration and CLI for TypeScript, Vue, React, JSON, YAML, and Markdown. Use when linting code, fixing style issues, or configuring ESLint in projects using lintroll.4---56# Lintroll78Batteries-included ESLint with 12+ plugins for TypeScript, Vue, React, JSON, YAML, and Markdown.910## CLI1112```bash13lintroll . # Lint directory14lintroll . --fix # Auto-fix15lintroll . --fix --cache # Fix with caching16lintroll --git . # Only git-tracked files17lintroll --git --fix . # Fix only tracked files18lintroll --staged --fix # Pre-commit hook19lintroll . --node # Enable Node.js rules20lintroll . --node=./scripts # Node.js rules for specific paths21lintroll . --quiet # Errors only (no warnings)22lintroll . --allow-abbreviation db # Allow specific abbreviations23```2425## Style Rules2627| Rule | Enforced style |28|------|---------------|29| Indentation | Tabs |30| Quotes | Single |31| Semicolons | Always |32| Line length | 100 chars max |33| Trailing commas | Multiline only |34| Functions | Arrow (except `this`/`arguments`/generators/hoisting) |35| Types | `type =` over `interface` |36| Type imports | Separate `import type` from value imports |37| No `any` | Use `unknown` and narrow |38| Unused vars | Prefix with `_` (e.g. `_unused`) |39| No abbreviations | `db` → `database`, `env` → `environment`, `pkg` → `packageJson` |40| Import extensions | `.js` not `.ts` (unless `allowImportingTsExtensions: true`) |41| React filenames | PascalCase (`UserProfile.tsx`) |4243### Abbreviation Mapping4445Common renames enforced by `unicorn/prevent-abbreviations`:4647| Abbreviation | Full name |48|-------------|-----------|49| `args` | `arguments_` (reserved word) |50| `db` | `database` |51| `env` | `environment` |52| `pkg` | `packageJson` |53| `temp` | `temporary` |54| `res` | `response` |55| `req` | `request` |56| `dir` | `directory` |57| `err` | `error` |58| `msg` | `message` |5960Loop indices `i`, `j` are always allowed. Add more with `--allow-abbreviation`.6162## ESLint Config6364Zero-config:6566```js67// eslint.config.js68export { default } from 'lintroll'69```7071Custom:7273```js74// eslint.config.ts75import { defineConfig, pvtnbr } from 'lintroll'7677export default defineConfig([78 { ignores: ['tests/fixtures/**/*'] },79 ...pvtnbr({80 node: true,81 allowAbbreviations: {82 exactWords: ['i', 'j'],83 substrings: ['db', 'env']84 }85 })86])87```8889For full API types, see `node_modules/lintroll/dist/index.d.mts`.9091## Auto-Detection9293| Feature | Detection |94|---------|-----------|95| Vue.js | `*.vue` files present — rules apply automatically |96| TypeScript | `tsconfig.json` present |97| Node.js | `.cjs`, `.mts`, `scripts/**`, `bin` entries |9899## Ignored by Default100101- `node_modules/**`, `dist/**`, `vendor/**`102- `package-lock.json`, `pnpm-lock.yaml`103- `*.min.js`, `.vitepress`104- AI assistant files: `CLAUDE.md`, `.claude/`, `copilot.json`, `.cursorrules`105106## JSON/YAML107108- package.json keys auto-sorted: `name → version → description → ... → scripts → dependencies → devDependencies`109- JSON style: tabs, trailing commas, spaces around braces `{ "key": "value" }`110111## Gotchas112113- **Abbreviation rules disabled in `.d.ts`** — declaration files follow standard conventions114- **`.ts` extensions in imports** — use `.js` unless tsconfig has `allowImportingTsExtensions: true`115- **Markdown code blocks in `skills/` directories** — automatically ignored (not linted as project code)