Skip to main content

Rule 54 - Project: Prohibited words

Words no file in the repository may contain.

Rules​

54.1. A repository file MUST NOT contain a prohibited word.

The list holds words the source must not carry. A platform Semetrika does not depend on is the typical entry: named in the code, the documentation, or the tooling, it reads as a dependency the design system does not have.

The words live in the detector, as PROHIBITED_WORDS in packages/cli/src/rules/54.js. Each entry pairs one word with allowedIn, the repo-relative paths of the files permitted to contain it. The detector spells every word, so every allow-list names the detector file.

export const PROHIBITED_WORDS = [
{ word: 'Example', allowedIn: ['packages/cli/src/rules/54.js', 'docs/content/example.md'] },
{ word: 'Sample', allowedIn: ['packages/cli/src/rules/54.js'] },
];

A word matches regardless of case and anywhere inside a line, so a package name or an identifier that embeds the word matches as well as the word in prose.

The scan reads every file git tracks, plus every untracked file that .gitignore does not exclude, so a new file is checked before it is staged. Binary files and symbolic links are skipped.

54.2. An allow-list entry MUST name a file the scan reads, and that file MUST still contain the word.

An entry grants one file an exception for one word. Once the word leaves the file the entry grants nothing, and a later edit could bring the word back without a review, so the stale entry is reported for removal.


Enforced by

54.1, 54.2 by yarn cli 54 (findProhibitedWords, findStaleAllowances in packages/cli/src/rules/54.js). See enforcement.md.