This is Bloq's ESLint shareable config.
It is based on the ESLint recommended rules and other well-known plugins and configs.
npm install --save-dev eslint eslint-config-bloq
Add this to the ESLint configuration file:
{
"extends": ["bloq"]
}
Additional rule sets are available:
bloq/jsdoc
bloq/markdown
bloq/mocha
bloq/next
bloq/node
bloq/typescript
bloq/vitest
The base rules are focused in identifying code patterns that are or could lead to common errors.
Enforcing code styles should be mainly done with tools like Prettier, adding it to the end of any extends
array to ensure the conflicting rules are deactivated:
{
"extends": ["bloq", "bloq/node", "prettier"]
}
After creating a feature branch and committing the changes, add a commit to update the package version:
npm version $VERSION # Use major|minor|parch as needed
git push --set-upstream origin $BRANCH
Once the commits are pushed, open a PR.
Then, when the PR is approved, merge the changes locally, apply and push a version tag if needed:
git checkout master
git merge --ff $BRANCH
TAG=v$(jq --raw-output '.version' <package.json); git tag --list $TAG | grep --quiet "^$TAG$" || git tag --sign --message="" $TAG
git push --follow-tags
Finally, create a release to trigger the publication to NPM.