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

Add support to commitlint.config.mjs and commitlintrc.mjs config file #3611

Closed
1 of 4 tasks
xiaoxiangmoe opened this issue May 22, 2023 · 4 comments · Fixed by #3747
Closed
1 of 4 tasks

Add support to commitlint.config.mjs and commitlintrc.mjs config file #3611

xiaoxiangmoe opened this issue May 22, 2023 · 4 comments · Fixed by #3747

Comments

@xiaoxiangmoe
Copy link

xiaoxiangmoe commented May 22, 2023

Expected Behavior

If config file is commitlint.config.mjs or commitlintrc.mjs is expected that works

Current Behavior

Is ignored

Affected packages

@commitlint/load

  • cli
  • core
  • prompt
  • config-angular

Possible Solution

No response

Context

No response

@escapedcat
Copy link
Member

Does this duplicate #2742 ?
For config support we rely on cosmicconfig and it looks like mjs support is still an open issue: cosmiconfig/cosmiconfig#224

@mrcsmcln
Copy link

Looks like this feature just landed in cosmiconfig.

@escapedcat
Copy link
Member

@mrcsmcln thanks for the info.
Now we need a PR :)

@escapedcat
Copy link
Member

Here's a PR but it fails with a jest error: #3623

jest-haste-map: Haste module naming collision: basic
  The following files share their name; please adjust your hasteImpl:
    * <rootDir>/@commitlint/config-lerna-scopes/fixtures/basic/package.json
    * <rootDir>/@commitlint/config-lerna-scopes/fixtures/modules/package.json

jest-haste-map: Haste module naming collision: empty
  The following files share their name; please adjust your hasteImpl:
    * <rootDir>/@commitlint/config-lerna-scopes/fixtures/empty/package.json
    * <rootDir>/@commitlint/config-nx-scopes/fixtures/empty/package.json

jest-haste-map: Haste module naming collision: a
  The following files share their name; please adjust your hasteImpl:
    * <rootDir>/@commitlint/config-lerna-scopes/fixtures/basic/packages/a/package.json
    * <rootDir>/@commitlint/config-lerna-scopes/fixtures/modules/packages/a/package.json

jest-haste-map: Haste module naming collision: @packages/b
  The following files share their name; please adjust your hasteImpl:
    * <rootDir>/@commitlint/config-lerna-scopes/fixtures/scoped/@packages/b/package.json
    * <rootDir>/@commitlint/config-lerna-scopes/fixtures/yarn/@packages/b/package.json

jest-haste-map: Haste module naming collision: @packages/a
  The following files share their name; please adjust your hasteImpl:
    * <rootDir>/@commitlint/config-lerna-scopes/fixtures/scoped/@packages/a/package.json
    * <rootDir>/@commitlint/config-lerna-scopes/fixtures/yarn/@packages/a/package.json

jest-haste-map: Haste module naming collision: b
  The following files share their name; please adjust your hasteImpl:
    * <rootDir>/@commitlint/config-lerna-scopes/fixtures/basic/packages/b/package.json
    * <rootDir>/@commitlint/config-nx-scopes/fixtures/basic/nx/b/package.json

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