@forinda/kickjs-lint
v5.2.0
Published
Lint rules for KickJS — DI token convention, plugin/adapter naming, and other framework conventions
Downloads
952
Maintainers
Readme
@forinda/kickjs-lint
Lint rules for KickJS conventions — DI tokens, plugin/adapter naming, and other framework patterns.
Install
pnpm add -D @forinda/kickjs-lintCLI
# adopter project — lints `src/`, warns on third-party kick/ squatting
kick-lint
# framework / first-party packages — lints `packages/`, errors on missing kick/ prefix
kick-lint --first-party
# custom scope
kick-lint --scope src,libsProgrammatic
import { runLint, formatViolations } from '@forinda/kickjs-lint'
const result = await runLint({ cwd: process.cwd(), firstParty: false })
if (result.violations.length > 0) console.error(formatViolations(result.violations))Rules
| Rule | Default | Description |
| ----------------------- | ------- | ----------------------------------------------------------------------------- |
| di-token-symbol | error | DI tokens must use createToken<T>() instead of Symbol(...) in token files |
| token-kick-prefix | error | First-party tokens must start with the reserved kick/ prefix |
| token-reserved-prefix | warn | Third-party tokens must not squat the reserved kick/ prefix |
Inline-disable a rule on a single line:
export const FOO = Symbol('Legacy') // kick-lint-disable di-token-symbolWhy
See architecture.md §22 for the convention rationale and the v3→v4 migration guide for what changed.
