Skip to content

Commit 1e0bb97

Browse files
committed
refactor(core): port core to typescript
1 parent f6b0021 commit 1e0bb97

File tree

5 files changed

+25
-5
lines changed

5 files changed

+25
-5
lines changed

@commitlint/core/index.js

-4
This file was deleted.

@commitlint/core/package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@
22
"name": "@commitlint/core",
33
"version": "8.3.5",
44
"description": "Lint your commit messages",
5+
"main": "lib/index.js",
6+
"types": "lib/index.d.ts",
57
"files": [
6-
"index.js"
8+
"lib/"
79
],
810
"scripts": {
911
"deps": "dep-check",

@commitlint/core/src/index.ts

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import format from '@commitlint/format';
2+
import load from '@commitlint/load';
3+
import lint from '@commitlint/lint';
4+
import read from '@commitlint/read';
5+
6+
export = {
7+
format,
8+
load,
9+
lint,
10+
read
11+
};

@commitlint/core/tsconfig.json

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"extends": "../../tsconfig.shared.json",
3+
"compilerOptions": {
4+
"composite": true,
5+
"rootDir": "./src",
6+
"outDir": "./lib"
7+
},
8+
"include": ["./src/**/*.ts"],
9+
"exclude": ["./src/**/*.test.ts", "./lib/**/*"]
10+
}

tsconfig.json

+1
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,6 @@
1717
{ "path": "@commitlint/read" },
1818
{ "path": "@commitlint/rules" },
1919
{ "path": "@commitlint/lint" },
20+
{ "path": "@commitlint/core" },
2021
]
2122
}

0 commit comments

Comments
 (0)