Skip to content

Commit 156dc21

Browse files
committed
chore(readme): added instructions
1 parent d0bde42 commit 156dc21

File tree

1 file changed

+30
-7
lines changed

1 file changed

+30
-7
lines changed

readme.md

Lines changed: 30 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,36 @@
1-
# `dual-ts-package-template`
1+
# `commitlint-plugin-cspell`
22

3-
[![Node.js CI](https://github.com/webdeveric/dual-ts-package-template/actions/workflows/node.js.yml/badge.svg)](https://github.com/webdeveric/dual-ts-package-template/actions/workflows/node.js.yml)
3+
[![Node.js CI](https://github.com/webdeveric/commitlint-plugin-cspell/actions/workflows/node.js.yml/badge.svg)](https://github.com/webdeveric/commitlint-plugin-cspell/actions/workflows/node.js.yml)
44

5-
## Usage
5+
## Install
66

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+
```
810

9-
### GitHub CLI
11+
## Configure rules
1012

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.
1214

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

Comments
 (0)