Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
4 tasks
decapination-labs opened this issue Jan 16, 2024 · 1 comment
Open
4 tasks

Comments

@decapination-labs
Copy link

decapination-labs commented Jan 16, 2024

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

@JounQin
Copy link
Contributor

JounQin commented Mar 8, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants