Thanks for considering a contribution. This repo publishes shared configs and tooling that other projects consume, so changes here ripple outward — please read carefully.
pnpm install
pnpm -r build
pnpm -r typecheck
pnpm -r testNode 22+ and pnpm 9.15.9+ are required (see .nvmrc and the packageManager field).
- Fork (or branch) from
main - Open a PR — direct pushes to
mainare not allowed - CI must be green
- A reviewer approves and merges via GitHub
Commits follow Conventional Commits. See CONVENTIONS.md for allowed scopes and commit-message rules.
Ask before adding runtime or peer dependencies. In the PR description explain: what the package does, why it's needed, and whether an existing dependency could serve the purpose.
Before cutting a release, verify the change against a consumer repo using pnpm's link:
cd packages/eslint-config
pnpm link --global
cd ../../path/to/consumer-repo
pnpm link --global @precisa-saude/eslint-config
pnpm lintRevert with pnpm unlink --global @precisa-saude/eslint-config in the consumer repo.
Every merge to main triggers a full release cycle via .github/workflows/release.yml:
- Commit analysis — conventional-commits determines the next semver.
- Version sync —
scripts/sync-versions.cjsbumps every non-privatepackages/*/package.jsonto the new version. Packages with"private": trueare skipped. - Publish —
pnpm -r --filter "./packages/*" publish --access publicships every public package to npm at the new version (all at the same version; consumers can pin each package independently). - Git + GitHub — updates
CHANGELOG.md, commits the bumped versions with[skip ci], creates a GitHub release.
Versioning rules (see .releaserc.cjs):
| Commit type | Bump |
|---|---|
feat |
minor |
fix / perf / refactor |
patch |
revert |
patch |
BREAKING CHANGE: in footer |
major |
docs / style / test / ci / chore / build |
none |
Include [skip ci] anywhere in the commit body to skip the release workflow entirely. Use sparingly — the standard flow is to let every merge pass through.
To see what semantic-release would do without touching anything:
pnpm exec semantic-release --dry-run --no-ciThis runs the commit analysis and prints the intended version / changelog without writing to the registry or the repo.