0.0.5 • Published 2 years ago
@janghood/lint v0.0.5
@janghood/lint
极客江湖lint库
Document
Janghood lint library,
dependence on eslint and commitlint+husky.
Usage
You should install dependency first.
So when you use @janghood/lint:
pnpm install --shamefully-hoistLint
// janghood.config.ts
export default defineJhConfig({
  lint: {
    eslint: {
      include: ['*'],
      exclude: ['node_modules'],
    }
  }
})TODO
oxlintconfig support
Commitlint
In package.json:
{
  "scripts": {
    "prepare": "jhlint install"
  }
}this script will automatically create husky's commit-msg and pre-push git hooks.
and you should provide your own lint script:
{
  "scripts": {
    "lint": "jhlint"
  }
}run prepare:
pnpm run prepareand set your own commitlint config:
// janghood.config.ts
export default defineJhConfig({
  lint: {
    commitlint: true
  }
})SKIP_BUCKET
change .husky/commit-msg, add SKIP_BUCKET=true before npx:
SKIP_BUCKET=true npx ...