case-police, by Anthony Fu, is a CLI that checks and fixes the casing of technology names such as GitHub and macOS. glosslint builds its tech preset directly from case-police's dictionaries so you can keep the same casing rules and add your own product glossary in one place.
Dictionary coverage
Section titled "Dictionary coverage"glosslint/presets/tech is generated from all five dictionaries of case-police 2.2.1 under the MIT License. The third-party license notice is in NOTICE. scripts/tech.ts reads every JSON dictionary and writes 477 distinct keys plus 7 allowed spellings.
| Dictionary | Entries |
|---|---|
softwares | 309 |
abbreviates | 118 |
brands | 30 |
general | 18 |
products | 13 |
| Total | 488 |
Casing parity and the 7 differences
Section titled "Casing parity and the 7 differences"glosslint matches case-police's casing rule: a word written all lowercase or all uppercase passes, so github and GITHUB pass while Github becomes GitHub. scripts/tech.ts sets case: "exact" and skip: ["lower", "upper"] on every term in the tech preset for that reason.
test/tech-parity.test.ts checks parity against case-police 2.2.1 directly. It places each of the 488 entries inside a sentence in four forms: Capitalised, lower, UPPER and the canonical spelling, making 1,952 cases. Both tools fix every sentence and the test compares the results.
Of the 1,952 cases, 1,945 produce the same output. The only 7 differences come from joined spellings that case-police lists beside a spaced form with the same key:
Term in glosslint/presets/tech | Joined spelling in allow |
|---|---|
Ant Design | AntDesign |
Ant Design Vue | AntDesignVue |
Composition API | CompositionAPI |
Graph RAG | GraphRAG |
Naive UI | NaiveUI |
Tailwind CSS | TailwindCSS |
Windi CSS | WindiCSS |
A glosslint corpus holds one term per key, so the preset keeps the spaced form, such as Tailwind CSS, as the term and puts the joined spelling, TailwindCSS, in allow. Because allow matches in any case, glosslint leaves Antdesign as written where case-police rewrites it to AntDesign. The spaced form still gets checked, so Ant design still rewrites to Ant Design.
What glosslint adds
Section titled "What glosslint adds"Extending glosslint/presets/tech puts technology names into the same corpus as the rest of your product vocabulary:
- Your own product terms. Define terms like
Dock,eBikeandDay Passalongside the tech preset, or load them from a Glossary table and combine them with other Built-in presets. - Avoid words with reasons. Flag discouraged terms such as
rackorhubwith awhymessage explaining what to use instead. - Context casing. Apply different styles in labels, table headers and sentences with
case: "context", such asDay Passin a button andday passin a sentence. See Casing. - Meaning on every finding. Every finding prints the term's description, nuance and documentation link so writers and coding agents learn the vocabulary as they work.
- Code, translations and docs. Run the same corpus through ESLint for JavaScript, TypeScript, Vue templates and YAML locales, x18n for translations, and the CLI for Markdown docs.
Moving over
Section titled "Moving over"Install glosslint
Section titled "Install glosslint"Install
glosslintas a dev dependency. glosslint needs Node 22.18 or later.pnpmpnpm add -D glosslintnpmnpm install -D glosslintExtend the tech preset
Section titled "Extend the tech preset"Create
glosslint.config.tsat the root of your repository and extendglosslint/presets/tech:import { defineCorpus } from "glosslint"; import tech from "glosslint/presets/tech"; export default defineCorpus({ extends: [tech], });Check Markdown and fix code
Section titled "Check Markdown and fix code"Run the CLI to check Markdown and text files:
npx glosslint checkNote
The glosslint CLI only reports findings and has no
--fixflag.To autofix casing in JavaScript, TypeScript, Vue templates and YAML locale files, wire your corpus into ESLint and run
eslint --fix.