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

feat: support config .cts extension #3461

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions @commitlint/load/src/utils/load-config.ts
Expand Up @@ -29,10 +29,13 @@ export async function loadConfig(

// files supported by TypescriptLoader
`.${moduleName}rc.ts`,
`.${moduleName}rc.cts`,
`${moduleName}.config.ts`,
`${moduleName}.config.cts`,
],
loaders: {
'.ts': TypeScriptLoader(),
'.cts': TypeScriptLoader(),
},
});

Expand Down
2 changes: 2 additions & 0 deletions README.md
Expand Up @@ -135,9 +135,11 @@ Check the [husky documentation](https://typicode.github.io/husky/#/?id=manual) o
- `.commitlintrc.js`
- `.commitlintrc.cjs`
- `.commitlintrc.ts`
- `.commitlintrc.cts`
- `commitlint.config.js`
- `commitlint.config.cjs`
- `commitlint.config.ts`
- `commitlint.config.cts`
- `commitlint` field in `package.json`
- Packages: [cli](./@commitlint/cli), [core](./@commitlint/core)
- See [Rules](./docs/reference-rules.md) for a complete list of possible rules
Expand Down