Skip to Content
Getting startedFoundationsComponentsPackagesTools

Config

Shared TypeScript, Prettier and prose configuration for hipuku repositories.

The TypeScript bases, Prettier presets and two text checks every hipuku repository shares.

@hipuku/config0.1.1Source on GitHub

Install

npm install --save-dev @hipuku/config

TypeScript

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-prose counts em dashes per file against a baseline, so the count can come down and never go up. Run it with --write to record a new baseline once the count has dropped.
  • hipuku-check-names fails 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.

On this page