Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rocketseat/commitlint-config
Shareable commitlint config used by Rocketseat 🚀
https://github.com/rocketseat/commitlint-config
commitlint commitlint-config git lint rocketseat
Last synced: about 2 months ago
JSON representation
Shareable commitlint config used by Rocketseat 🚀
- Host: GitHub
- URL: https://github.com/rocketseat/commitlint-config
- Owner: Rocketseat
- License: mit
- Created: 2019-05-16T20:12:56.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2021-02-18T20:09:17.000Z (almost 4 years ago)
- Last Synced: 2024-10-29T15:31:25.345Z (2 months ago)
- Topics: commitlint, commitlint-config, git, lint, rocketseat
- Language: JavaScript
- Homepage:
- Size: 8.79 KB
- Stars: 99
- Watchers: 8
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# @rocketseat/commitlint-config
Shareable [`commitlint`](https://github.com/conventional-changelog/commitlint) config used by Rocketseat.
## Install
You can install it with npm or Yarn.
```sh
# npm
npm i -D @rocketseat/commitlint-config @commitlint/cli# Yarn
yarn add -D @rocketseat/commitlint-config @commitlint/cli
```## Usage
After installing it, apply the config to `commitlint` by running the following command:
```sh
echo "module.exports = { extends: ['@rocketseat/commitlint-config'] };" > .commitlintrc.js
```## Bonus
To lint commits before they are created, install Husky and use the 'commit-msg' hook.
```sh
# Npm
npm i -D husky# Yarn
yarn add -D husky
```After that, you can create a `.huskyrc` file or add to your `package.json` the following code for
Husky v4:
```json
{
"husky": {
"hooks": {
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
}
}
}
```Husky v5:
```
# .husky/commit-msg
# ...
npx --no-install commitlint --edit $1
# or
yarn commitlint --edit $1
```## Version Support
- Node.js [LTS](https://github.com/nodejs/LTS#lts-schedule) `>= 10.21.0`
- git `>= 2.13.2`## License
MIT License © [Rocketseat](https://github.com/Rocketseat)