Config
Shared TypeScript, Prettier and prose configuration for hipuku repositories.
The TypeScript bases, Prettier presets and two text checks every hipuku repository shares.
Install
npm install --save-dev @hipuku/configTypeScript
Extend a base from tsconfig.json: base, react or node.
{ "extends": "@hipuku/config/tsconfig/react.json" }Prettier
Name a preset in package.json. prettier is the default; prettier/wide is 120 columns, with no
semicolons and single quotes.
{ "prettier": "@hipuku/config/prettier/wide" }The checks
{
"scripts": {
"lint:prose": "hipuku-check-prose",
"lint:names": "hipuku-check-names"
}
}hipuku-check-prosecounts em dashes per file against a baseline, so the count can come down and never go up. Run it with--writeto record a new baseline once the count has dropped.hipuku-check-namesfails on a blocked name in a file, a commit message or the git identity.
There is no JavaScript API: the package is configuration and two commands.
The full reference is the package README.