Skip to content

Commit f6b9fb7

Browse files
committed
docs: add troubleshooting
1 parent 08b3983 commit f6b9fb7

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

docs/.vitepress/config.ts

+1
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ export default defineConfig({
6868
base: '/support',
6969
collapsed: true,
7070
items: [
71+
{text: 'Troubleshooting', link: '/troubleshooting'},
7172
{text: 'Releases', link: '/releases'},
7273
{text: 'Upgrade commitlint', link: '/upgrade'},
7374
],

docs/support/troubleshooting.md

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Troubleshooting
2+
3+
## Getting `Range error: Found invalid rule names: [...]` after update {#range-error-invalid-rule}
4+
5+
After updating one or more `@commitlint` packages you might encounter an error like:
6+
7+
```text
8+
Found invalid rule names: header-trim.
9+
Supported rule names are: body-case, body-empty, ...
10+
```
11+
12+
The source of this error is likely a mismatch of version between `@commitlint` packages in `node_modules`.
13+
14+
E.g.: you might have a config requesting a rule that is not included in `@commitlint/rules`.
15+
16+
> [!TIP]
17+
> If you are relying on a config which depends on an earlier version of `@commitlint/config-conventional` be sure to update them:
18+
>
19+
> ```sh
20+
> npm update @commitlint/config-conventional
21+
> ```
22+
23+
---
24+
25+
> [!NOTE]
26+
> Detailed explanation about the error can be found in this [comment](https://github.com/conventional-changelog/commitlint/pull/3871#issuecomment-1911455325).

0 commit comments

Comments
 (0)