| name | lintroll |
| description | 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. |
Lintroll
Batteries-included ESLint with 12+ plugins for TypeScript, Vue, React, JSON, YAML, and Markdown.
CLI
lintroll .
lintroll . --fix
lintroll . --fix --cache
lintroll --git .
lintroll --git --fix .
lintroll --staged --fix
lintroll . --node
lintroll . --node=./scripts
lintroll . --quiet
lintroll . --allow-abbreviation db
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:
export { default } from 'lintroll'
Custom:
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)