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

Introduction to glosslint

Learn how glosslint checks product terms across ESLint, x18n and Markdown docs from one glossary, and what its three finding codes report.

This page explains what glosslint checks, how its pieces connect, and where to go next in the guide. Read it first if you are evaluating glosslint or setting up a product glossary for your repository.

Product terms drift across a codebase. A button says Buy a day pass, a YAML locale file says Check-out, a code comment says rack instead of dock, and a Markdown guide writes e-bike. People who are new to the project, and coding agents working from a prompt, do not know which word the product uses or why another word is wrong.

glosslint keeps one corpus of your product's words in glosslint.config.ts. Each term holds its spelling, its casing rules, what the concept means, how it differs from nearby concepts, and which words to avoid. You can also load terms from a Markdown glossary table or extend the built-in tech and inclusive presets.

Every finding prints the reason and the term's meaning alongside the fix. People learn the product vocabulary while they fix lint errors, and coding agents get enough context to decide whether a suggested word fits the sentence.

Every tool reports the same three finding codes:

CodeWhat it reports
GLOSSLINT_TERMA term written with other splits or hyphens, such as e-bike for eBike or Check-out for Checkout. An avoid word with the same key as a term, such as day-pass for Day Pass, also reports GLOSSLINT_TERM.
GLOSSLINT_AVOIDAn avoid word used in place of a term, such as rack instead of Dock. Its finding prints the reason why and offers a suggestion rather than an autofix.
GLOSSLINT_CASEWrong capitals on an exact term, a context term, or an abbreviation, such as day pass in a label or Day Pass inside a sentence.

See Findings for the full structure of a finding, its JSON output, and the three fix.kind values.

defineCorpus validates your config at load time and returns a flat corpus. One matcher checks text against that corpus, and ESLint, x18n and the CLI each feed it the text they own.

glosslint.config.tsglossary table + presetsMatcherESLintcode, YAML locales,comments, identifiersx18ntranslationsCLIMarkdown docsFindingswhy, fix, meaningfor people and agents

Every example in these docs uses an invented bike-share app with terms like Dock, eBike, Day Pass, Station and Checkout. The complete working example lives in examples/basic.

  • Installation: install glosslint, check the Node 22.18 requirement, write a starter config, and run your first check and corpus test.
  • The corpus: configure glosslint.config.ts, allow phrases that have a second meaning, and understand merge order across extends.
  • Terms: define each term's spelling, description, nuance, avoid words, examples, links, abbreviations, forms and translations.
  • Casing: choose between spelling, exact and context casing, set case styles per text kind, and override detection with kindOf.
  • Ignored text: see which placeholders, ICU syntax, URLs, paths, backticks and code tokens glosslint blanks out before matching.
  • Glossary table: load terms from a Markdown table with fromGlossaryTable and map custom column headers.
  • Presets: extend the built-in tech and inclusive presets and override or allow individual terms.
  • case-police: see how glosslint uses the case-police dictionaries in the tech preset.
  • Coding agents: generate .agents/terms.md for AGENTS.md, follow the five-step agent workflow, and install the glosslint skill.