diff --git a/@commitlint/core/index.js b/@commitlint/core/index.js deleted file mode 100644 index c845835ba9..0000000000 --- a/@commitlint/core/index.js +++ /dev/null @@ -1,4 +0,0 @@ -module.exports.format = require('@commitlint/format'); -module.exports.load = require('@commitlint/load'); -module.exports.lint = require('@commitlint/lint'); -module.exports.read = require('@commitlint/read'); diff --git a/@commitlint/core/package.json b/@commitlint/core/package.json index bb45ed41a3..f03b84c11f 100644 --- a/@commitlint/core/package.json +++ b/@commitlint/core/package.json @@ -2,8 +2,10 @@ "name": "@commitlint/core", "version": "8.3.5", "description": "Lint your commit messages", + "main": "lib/core.js", + "types": "lib/core.d.ts", "files": [ - "index.js" + "lib/" ], "scripts": { "deps": "dep-check", diff --git a/@commitlint/core/src/core.ts b/@commitlint/core/src/core.ts new file mode 100644 index 0000000000..2ca69e66be --- /dev/null +++ b/@commitlint/core/src/core.ts @@ -0,0 +1,11 @@ +import format from '@commitlint/format'; +import load from '@commitlint/load'; +import lint from '@commitlint/lint'; +import read from '@commitlint/read'; + +export = { + format, + load, + lint, + read +}; diff --git a/@commitlint/core/tsconfig.json b/@commitlint/core/tsconfig.json new file mode 100644 index 0000000000..433a665f64 --- /dev/null +++ b/@commitlint/core/tsconfig.json @@ -0,0 +1,10 @@ +{ + "extends": "../../tsconfig.shared.json", + "compilerOptions": { + "composite": true, + "rootDir": "./src", + "outDir": "./lib" + }, + "include": ["./src/**/*.ts"], + "exclude": ["./src/**/*.test.ts", "./lib/**/*"] +} diff --git a/tsconfig.json b/tsconfig.json index 314a1e218e..729adf3dbd 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -17,5 +17,6 @@ { "path": "@commitlint/read" }, { "path": "@commitlint/rules" }, { "path": "@commitlint/lint" }, + { "path": "@commitlint/core" }, ] }