Package Exports
- @commitlint/config-lerna-scopes
- @commitlint/config-lerna-scopes/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@commitlint/config-lerna-scopes) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@commitlint/config-lerna-scopes
Lint your lerna project commits
Shareable commitlint config enforcing lerna package scopes.
Use with @commitlint/cli and @commitlint/prompt-cli.
[!IMPORTANT]
If you are using NPM or Yarn workspaces, please use the @commitlint/config-workspace-scopes package instead. Support for workspaces will be removed from this package in a future major version.
Getting started
npm install --save-dev @commitlint/config-lerna-scopes @commitlint/cli
echo "export default {extends: ['@commitlint/config-lerna-scopes']};" > commitlint.config.jsExamples
❯ cat commitlint.config.js
{
extends: ['@commitlint/config-lerna-scopes']
}
❯ tree packages
packages
├── api
├── app
└── web
❯ echo "build(api): change something in api's build" | commitlint
⧗ input: build(api): change something in api's build
✔ found 0 problems, 0 warnings
❯ echo "test(foo): this won't pass" | commitlint
⧗ input: test(foo): this won't pass
✖ scope must be one of [api, app, web] [scope-enum]
✖ found 1 problems, 0 warnings
❯ echo "ci: do some general maintenance" | commitlint
⧗ input: ci: do some general maintenance
✔ found 0 problems, 0 warningsConsult Rules reference for a list of available rules.