diff --git a/@commitlint/load/src/utils/load-config.ts b/@commitlint/load/src/utils/load-config.ts index cedddb4d45..6c1d8d8e8a 100644 --- a/@commitlint/load/src/utils/load-config.ts +++ b/@commitlint/load/src/utils/load-config.ts @@ -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(), }, }); diff --git a/README.md b/README.md index 78e3ea09e7..c73ecc93b4 100644 --- a/README.md +++ b/README.md @@ -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