conventional-changelog / commitlint

📓 Lint commit messages

Home Page:https://commitlint.js.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fix: commitlint.config.ts cannot find module UserConfig from @commilint/types

decapination-labs opened this issue · comments

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
import type { UserConfig } from '@commitlint/types';

const Configuration: UserConfig = {
  extends: ['@commitlint/config-conventional'],
};

export default Configuration;
  1. run :
    "check-types": "tsc --noEmit --pretty"

Context

No response

commitlint --version

v18.4.4

git --version

v2.39.3

node --version

v19.2.0

@decapination-labs The new docs are for v19, not v18.