GitHub 0
Skip to content
glosslint is in preview and not on npm yet. Version 0.0.1 will be the first release.

Coming from case-police

How glosslint's tech preset matches case-police 2.2.1 across 488 entries, where the 7 joined spellings differ, and how to migrate.

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.

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.

DictionaryEntries
softwares309
abbreviates118
brands30
general18
products13
Total488

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/techJoined spelling in allow
Ant DesignAntDesign
Ant Design VueAntDesignVue
Composition APICompositionAPI
Graph RAGGraphRAG
Naive UINaiveUI
Tailwind CSSTailwindCSS
Windi CSSWindiCSS

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.

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, eBike and Day Pass alongside 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 rack or hub with a why message explaining what to use instead.
  • Context casing. Apply different styles in labels, table headers and sentences with case: "context", such as Day Pass in a button and day pass in 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.
  1. Install glosslint as a dev dependency. glosslint needs Node 22.18 or later.

    pnpm
    pnpm add -D glosslint
    npm
    npm install -D glosslint
  2. Create glosslint.config.ts at the root of your repository and extend glosslint/presets/tech:

    import { defineCorpus } from "glosslint";
    import tech from "glosslint/presets/tech";
    
    export default defineCorpus({
      extends: [tech],
    });
    glosslint.config.ts
  3. Run the CLI to check Markdown and text files:

    npx glosslint check

    Note

    The glosslint CLI only reports findings and has no --fix flag.

    To autofix casing in JavaScript, TypeScript, Vue templates and YAML locale files, wire your corpus into ESLint and run eslint --fix.