Skip to content

wey-gu/case-police

 
 

Repository files navigation

CasePolice

NPM version

  • GitHub, not Github
  • TypeScript, not Typescript
  • macOS, not MacOS
  • VS Code, not Vscode
  • ...

Make the case correct, PLEASE!

Usage

Make sure you have committed all unsaved works, and then

npx case-police --fix

It will scan all your source files and fix the cases of known names.

Only the word including both uppercase and lowercase will be fixed. (e.g. Github -> GitHub; github and GITHUB will be left untouched).

Using in CI

Simply add case-police (without --fix) to your workflow and it will exit with a non-zero code for your CI to catch it.

CLI Options

Options Description
--fix Rewrite changes to file
-d, --dict <path> Custom dictionary JSON, will be merged with original dict
--no-default Disable the default dictionary
--disable <rules> Disable rules, comma separated

Sponsors

License

MIT License © 2021 Anthony Fu

About

Make the case correct, PLEASE!

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 98.5%
  • JavaScript 1.5%