- Node.js 22.13.0 or newer
- pnpm 11.23.0 through Corepack
corepack enable
pnpm install
pnpm checkpnpm check verifies formatting, linting, types, and tests. Lefthook installs
the same checks for commits and pushes during pnpm install.
Use Conventional Commit messages, such as feat: add a detector option or
fix(core): preserve original offsets.
Run pnpm changeset for user-visible package changes. Documentation-only and
internal maintenance changes may omit a changeset.
Maintainers should follow the release runbook for the direct v1.0.0 release, future prereleases, npm Trusted Publishing, and registry verification.
To change an existing language dictionary:
- Edit
dictionaries/<language>/words.txtand update itsmetadata.json, including that pack's semantic version. Pack versions evolve independently: bump major for a fundamental curation-policy or compatibility-boundary change, minor for reviewed word additions or removals, and patch for metadata/provenance corrections that leave the word set unchanged. - Add a focused regression test for the behavior the change addresses.
- Run
pnpm dictionary:generateand commit the updated generated file. - Add a changeset because dictionary changes affect package behavior.
- Follow the curation and evaluation-corpus guidance in
dictionaries/README.md.
To add a new language pack:
- Open an issue before beginning substantial corpus work so scope and review expectations can be agreed first.
- Create
dictionaries/<language>/words.txtandmetadata.json. - Run
pnpm dictionary:generateto create the generated module. - Add
packages/profanity-kit/src/languages/<language>.tsand expose it inpackages/profanity-kit/package.json. - Add tests for importing the pack, detecting a representative entry, and keeping it isolated from other language packs.
- Document the new import path in the relevant package README and docs.
- Add a changeset.
Do not edit files in packages/profanity-kit/src/generated/ manually. See
dictionaries/README.md for dictionary formatting,
review, and provenance requirements. Run pnpm check before submitting the
change.
- Keep each pull request focused and explain the behavior it changes.
- Add tests for observable behavior.
- Run
pnpm checkbefore requesting review. - Document relevant architectural tradeoffs and flag conflicts with an ADR.
By contributing, you agree that your contributions are licensed under the MIT License.