🚨 CasePolice
- 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).
Use 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 |
License
MIT License © 2021 Anthony Fu