conventional-changelog / conventional-changelog/commitlint
fix: commitlint.config.ts cannot find module UserConfig from @commilint/types
- Dominant language
- TypeScript
- Stars
- 18.7k
- Forks
- 970
- Avg merge
- 7h 33m
- Merged PRs (30d)
- 49
Description
### Expected Behavior
```
import type { UserConfig } from '@commitlint/types';
const Configuration: UserConfig = {
extends: ['@commitlint/config-conventional'],
};
export default Configuration;
```
as mentioned in docs , but one time i run :
tsc --noEmit --pretty and then i started get error not found UserConfig and i cant find @commitlint/types so i installed as peer dependency to bypass the error .. the same happened with postcss-load-config...
these the versions i use :
"@commitlint/cli": "^18.4.4",
"@commitlint/config-conventional": "^18.4.4",
"@commitlint/cz-commitlint": "^18.4.4",
### Current Behavior
_No response_
### Affected packages
- [ ] cli
- [ ] core
- [ ] prompt
- [ ] config-angular
### Possible Solution
_No response_
### Steps to Reproduce
1. create next project with pnpm typescript
2. create .commitlint.config.ts
```bash
import type { UserConfig } from '@commitlint/types';
const Configuration: UserConfig = {
extends: ['@commitlint/config-conventional'],
};
export default Configuration;
```
3. run :
`"check-types": "tsc --noEmit --pretty"`
### Context
_No response_
### commitlint --version
v18.4.4
### git --version
v2.39.3
### node --version
v19.2.0
Contributor guide
Assessment
This issue has not been assessed yet.