AgentSkillsCN

lintroll

为 TypeScript、Vue、React、JSON、YAML 与 Markdown 提供富有主张的 ESLint 配置与 CLI 工具。当您需要对代码进行 lint 检查、修复风格问题,或在使用 lintroll 的项目中配置 ESLint 时,此工具将助您事半功倍。

SKILL.md
--- frontmatter
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

bash
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

RuleEnforced style
IndentationTabs
QuotesSingle
SemicolonsAlways
Line length100 chars max
Trailing commasMultiline only
FunctionsArrow (except this/arguments/generators/hoisting)
Typestype = over interface
Type importsSeparate import type from value imports
No anyUse unknown and narrow
Unused varsPrefix with _ (e.g. _unused)
No abbreviationsdbdatabase, envenvironment, pkgpackageJson
Import extensions.js not .ts (unless allowImportingTsExtensions: true)
React filenamesPascalCase (UserProfile.tsx)

Abbreviation Mapping

Common renames enforced by unicorn/prevent-abbreviations:

AbbreviationFull name
argsarguments_ (reserved word)
dbdatabase
envenvironment
pkgpackageJson
temptemporary
resresponse
reqrequest
dirdirectory
errerror
msgmessage

Loop indices i, j are always allowed. Add more with --allow-abbreviation.

ESLint Config

Zero-config:

js
// eslint.config.js
export { default } from 'lintroll'

Custom:

js
// 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

FeatureDetection
Vue.js*.vue files present — rules apply automatically
TypeScripttsconfig.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)