A CLI tool for browsing, installing, and managing custom TypeScript lint rules as local Go source files, inspired by shadcn for UI components. Current version 0.9.0; releases appear every 2–3 weeks. Unlike ESLint plugins or convention-based linters, lintcn copies rule source into your project so you fully own and can customize each rule. Powered by tsgolint (Go-based TypeScript linter with type-aware analysis). Minimizes false positives by running only explicitly added rules. Supports automatic fixes, warning severity, and snapshot testing.
npm install lintcnNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Install lintcn, add a type-aware lint rule file from the tsgolint repository, run lint, and list installed rules.
Check for .lintcn/ directory explicitly in CI scripts if you require rules to be installed.
For each rule file in .lintcn/, move it into a new subfolder named after the rule (snake_case). The Go package declaration inside the file should match the folder name.
Use --all-warnings to see all warnings, and configure rule severity via // lintcn:severity warn in rule source.
Update to v0.5.0 or later. If using older version, avoid using --tsgolint-version with untrusted input.
Update rule Go files: replace 'github.com/typescript-eslint/tsgolint/internal/rule' with 'github.com/typescript-eslint/tsgolint/pkg/rule' (and similarly for internal/utils to pkg/utils).
Use npx lintcn add to add each desired rule from the tsgolint repository. Alternatively, configure a separate tsgolint run for built-in rules.
Upgrade to v0.5.0 or later to avoid intermittent failures when running multiple lintcn processes simultaneously.
Run 'npm install -D lintcn' to add it as a devDependency.
Use 'npx lintcn add <url>' to install a rule.
Rename the folder to match the package declaration, or edit the package declaration to match the folder name (e.g., package no_unhandled_error in folder .lintcn/no_unhandled_error/).
Replace 'github.com/typescript-eslint/tsgolint/internal/rule' with 'github.com/typescript-eslint/tsgolint/pkg/rule'.
Use a valid version like 'v0.9.2' for --tsgolint-version.