npm.io
0.0.5 • Published 2 years agoCLI

@janghood/lint

Licence
MIT
Version
0.0.5
Deps
16
Size
6.7 MB
Vulns
0
Weekly
0
Stars
2

@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-hoist
Lint
// janghood.config.ts
export default defineJhConfig({
  lint: {
    eslint: {
      include: ['*'],
      exclude: ['node_modules'],
    }
  }
})
TODO
  • oxlint config 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 prepare

and 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 ...

Keywords