yarn add --dev @macpaw/eslint-config-base
yarn add --dev @macpaw/eslint-config-react
yarn add --dev @macpaw/eslint-config-typescript
yarn add --dev @macpaw/eslint-config-prettier
Extend necessary configs inside .eslintrc.json
:
{
"extends": [
"@macpaw/eslint-config-base", // optional (required only when you do not use packages below)
"@macpaw/eslint-config-react", // optional
"@macpaw/eslint-config-typescript", // optional
"@macpaw/eslint-config-prettier", // optional
]
}
Our library release process is designed to ensure quality, consistency, and proper versioning. The process is broken down into multiple stages to ensure every change is tracked, reviewed, and integrated appropriately. We use changesets for version and release management.
Whenever you introduce a new change, run the command:
You have to do this at least once per branch with some changes.
pnpm changes:add
- The CLI will prompt you with questions regarding your changes. You'll need to specify the nature and level of the changes (options: patch, minor, major).
- After completing the CLI prompts, commit the changes with a commit message similar to
chore: update changesets
.
Steps to make a release:
- To initiate a release, create a pull request from
master
torelease
with the title Release. - Ensure all CI checks pass successfully.
- Once CI checks are green and you have at least one approval, merge the pull request.
- Post-merge, the release GitHub Actions will trigger and create an "update versions" pull request to the
release
branch. - Wait for the CI to turn green on the "update versions" pull request.
- Once CI is green, merge the "update versions" pull request.
- After this merge, the actions will trigger again. This time, they'll generate a new tag, create a new release, and publish packages to both GitHub and npm registries.
After a successful release, ensure you create a backmerge pull request from release
to master
. This ensures that the master
branch stays up-to-date with the latest versions and changes.
There is a way to test new version of eslint-config without publishing it to npm:
- Execute
npm link
inside a necessary config project root. - Execute
npm link @macpaw/eslint-config-${name}
inside related project's root. - Rebuild related project if needed.
- When finish testing run
npm unlink @macpaw/eslint-config-${name}