|
1 | | -# `dual-ts-package-template` |
| 1 | +# `commitlint-plugin-cspell` |
2 | 2 |
|
3 | | -[](https://github.com/webdeveric/dual-ts-package-template/actions/workflows/node.js.yml) |
| 3 | +[](https://github.com/webdeveric/commitlint-plugin-cspell/actions/workflows/node.js.yml) |
4 | 4 |
|
5 | | -## Usage |
| 5 | +## Install |
6 | 6 |
|
7 | | -Click the "Use this template" button on this page and select "Create a new repository." |
| 7 | +```sh |
| 8 | +pnpm add commitlint-plugin-cspell -D |
| 9 | +``` |
8 | 10 |
|
9 | | -### GitHub CLI |
| 11 | +## Configure rules |
10 | 12 |
|
11 | | -Reference: https://cli.github.com/manual/gh_repo_create |
| 13 | +This config shows all the rules provided by this plugin. You must use at least one of them to get spell checking. |
12 | 14 |
|
13 | | -`gh repo create [YOUR-REPO-NAME] --template webdeveric/dual-ts-package-template --private` |
| 15 | +:information_source: If you're using conventional commits, you'll probably want to use `cspell/type`, `cspell/scope`, and `cspell/subject` instead of `cspell/header`. |
| 16 | + |
| 17 | +--- |
| 18 | + |
| 19 | +Example `commitlint.config.mjs`: |
| 20 | + |
| 21 | +```js |
| 22 | +/** |
| 23 | + * @type {import('@commitlint/types').UserConfig} |
| 24 | + */ |
| 25 | +export default { |
| 26 | + plugins: ['commitlint-plugin-cspell'], |
| 27 | + rules: { |
| 28 | + 'cspell/type': [2, 'always'], |
| 29 | + 'cspell/scope': [2, 'always'], |
| 30 | + 'cspell/subject': [2, 'always'], |
| 31 | + 'cspell/header': [2, 'always'], |
| 32 | + 'cspell/body': [2, 'always'], |
| 33 | + 'cspell/footer': [2, 'always'], |
| 34 | + }, |
| 35 | +}; |
| 36 | +``` |
0 commit comments