Skip to main content

@codelaw/rules-spell

codelaw's spell checker — one of the first-party rule packs (SR-RULE-PACKS), on npm and PyPI (codelaw-rules-spell). It reads the prose of every L3 language from the tree the engine parsed: comments and docstrings, prose strings, Markdown and HTML text, the string values of JSON, YAML and TOML, and the names a file declares — identifiers, keys, classes and ids. It is codelaw's own code and codelaw's own word data, generated from SCOWL (SR-SPELL); it does not wrap CSpell.

codelaw init never adds it: a team installs it on purpose.

# codelaw.toml
extends = ["codelaw:spell/recommended"]
preview = true   # every rule is `preview` until a corpus run promotes it
npm i -D @codelaw/rules-spell      # or
pip install codelaw-rules-spell

Presets

preset rules ported from
spell/recommended 3 codelaw's own: known typos from a list generated from SCOWL, fixed unattended
spell/strict 6 spell/recommended plus the dictionary check, one spelling per word across the project and the [spell] words check

Rules

rule fix flags
spell/known-typo auto a word on the known-typo list in a comment, a doc, a prose string or Markdown
spell/known-typo-identifier auto a known typo in a JS, TS or Python name where it is declared; renamed only when the name is provably file-local
spell/known-typo-key manual a known typo in a JSON, YAML or TOML key, a CSS or SCSS class, id or custom property, or an HTML id
spell/unknown-word suggest a word of prose in no word list; the nearest dictionary word as the edit, up to three named (spell/strict)
spell/locale-variant auto the other locale's spelling (colour under en-US), while [spell] locale is set (in no preset)
spell/inconsistent-term suggest one word spelled two ways across the project (canceled / cancelled); the spelling the project uses most as the edit (spell/strict, a project rule)
spell/suspicious-word manual a [spell] words entry that is a known typo or one edit from a common word (spell/strict)

Config

# codelaw.toml (the root config only)
[spell]
locale = "en-US"            # or "en-GB"; spell/locale-variant reports the other one
words = ["kubectl", "Acme"] # accepted by every spell/* rule; spell/suspicious-word checks them

[rules]
"spell/locale-variant" = "warn"

The word data

data/spell/ is written by scripts/spell-data.py and committed; the same sources write the same bytes: typos.json (188,138 generated known typos), words.json (92,758 words: SCOWL's US and British English to size 60, and the software terms) and locale.json (VarCon's one-to-one US and British pairs). Sources and their notices: NOTICE.

Metadata

Release files for codelaw-rules-spell 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for codelaw-rules-spell 0.3.0
File Interpreter ABI Platform Actions
codelaw_rules_spell-0.3.0-py3-none-any.whl Python 3 none any Details for codelaw_rules_spell-0.3.0-py3-none-any.whl

Release files / codelaw_rules_spell-0.3.0-py3-none-any.whl

Download URL codelaw_rules_spell-0.3.0-py3-none-any.whl
Size 1.1 MB
Tags Python 3
SHA-256 checksum
How to use checksums
6a6d3f0b0f61d73df09a6f2cc3eef1b486a88f53dbfcb697e85c586ae1d59220
BLAKE2b-256 checksum
How to use checksums
5be445b05768fb825315a62abea8ecd1d2cc0f88da0561c38459ce0c39a2966b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 29, 2026.

Transparency log

Security for codelaw-rules-spell 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

1 file in this release has been uploaded with provenance metadata.

Attestation for codelaw_rules_spell-0.3.0-py3-none-any.whl

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 29, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page