@funish/lint
v0.0.2
Published
Integrated one-click Linter, powered by Funish.
Downloads
284
Maintainers
Readme
@funish/lint
Integrated one-click Linter, powered by Funish.
Getting started
# npm
$ npm install -D @funish/lint
# yarn
$ yarn add -D @funish/lint
# pnpm
$ pnpm add -D @funish/lint
Usage
// lint.config.ts
import { defineLintConfig } from "@funish/lint";
export default defineLintConfig({
staged: {
"*.ts": "pnpm check",
"!*.ts": "pnpm format",
},
});
Use @funish/githooks to integrate it with Git hooks.
// githooks.config.ts
import { defineGithooksConfig } from "@funish/githooks";
export default defineGithooksConfig({
hooks: {
"pre-commit": "pnpm lint staged",
"commit-msg": "pnpm lint commit-msg",
},
});
CLI
$ lint -h
USAGE lint commit-msg|staged
COMMANDS
commit-msg Lint commit message
staged Lint staged files
Use lint <command> --help for more information about a command.
Interfaces
See it on JSDoc.