0.0.5 • Published 3 months ago

@janghood/lint v0.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
3 months ago

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