https://github.com/juliancataldo/retext-case-police
A `retext` plugin for checking popular names casing. Example: ⚠️ `github` → ✅ `GitHub`
https://github.com/juliancataldo/retext-case-police
case casing casing-change linting retext retext-plugin spell-checker unified
Last synced: 24 days ago
JSON representation
A `retext` plugin for checking popular names casing. Example: ⚠️ `github` → ✅ `GitHub`
- Host: GitHub
- URL: https://github.com/juliancataldo/retext-case-police
- Owner: JulianCataldo
- License: isc
- Created: 2022-08-26T05:12:57.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2025-01-14T21:27:34.000Z (5 months ago)
- Last Synced: 2025-05-08T23:43:00.218Z (24 days ago)
- Topics: case, casing, casing-change, linting, retext, retext-plugin, spell-checker, unified
- Language: TypeScript
- Homepage:
- Size: 183 KB
- Stars: 8
- Watchers: 2
- Forks: 2
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# `retext-case-police`
[](https://www.npmjs.com/package/@julian_cataldo/retext-case-police)
[](./LICENSE)
[](https://code.visualstudio.com)
[](https://unifiedjs.com)
[](http://www.typescriptlang.org/)
[](https://prettier.io)
[](https://editorconfig.org)
[](https://eslint.org)
[](https://makeapullrequest.com)A `retext` plugin for checking popular names casing.
Examples:
- ⚠️ `macbook` → ✅ **`MacBook`**
- ⚠️ `MacOS` → ✅ **`macOS`**
- 🤔…
- ⚠️ `ESBuild` → ✅ **`esbuild`**
- ⚠️ `eslint` → ✅ **`ESLint`**
- 😭…For:
- [Abbreviates](https://github.com/antfu/case-police/blob/main/dict/abbreviates.json)
- [Brands](https://github.com/antfu/case-police/blob/main/dict/brands.json)
- [General](https://github.com/antfu/case-police/blob/main/dict/general.json)
- [Products](https://github.com/antfu/case-police/blob/main/dict/products.json)
- [Softwares](https://github.com/antfu/case-police/blob/main/dict/softwares.json)---
Dictionaries are from [`case-police`](https://github.com/antfu/case-police).
# Demo

# Quick start
## Installation
```sh
pnpm install @julian_cataldo/retext-case-police
```> **Note**: 100% **ESM**, including dependencies
> For Node.js **17** and higher (using JSON import assertions) or with `--experimental-json-modules` flag with Node **16**.## Usage
```ts
import retextCasePolice from '@julian_cataldo/retext-case-police';// …
.use(retextCasePolice)
// …// ——————— With options ————v
// Ignore words
.use(retextCasePolice, { ignore: ['GitHub'] })```
## To do
- [x] Ignore words
- [x] Resolve Parcel stripping out `assert { type: 'json' }`
- [ ] Ignore links (e.g `https://` wrongly flagged)
- [ ] Custom dictionaries embedding?---
See [CHANGELOG.md](./CHANGELOG.md) for release history.
---
🔗 [JulianCataldo.com](https://www.juliancataldo.com)