Skip to content

Commit b5ba369

Browse files
authoredFeb 6, 2020
refactor: port core to typescript (conventional-changelog#961)
* refactor(core): port core to typescript * refactor(core): rename file and fix formatting
1 parent 5281822 commit b5ba369

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/core.js",
6+
"types": "lib/core.d.ts",
57
"files": [
6-
"index.js"
8+
"lib/"
79
],
810
"scripts": {
911
"deps": "dep-check",

‎@commitlint/core/src/core.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
@@ -18,5 +18,6 @@
1818
{ "path": "@commitlint/read" },
1919
{ "path": "@commitlint/rules" },
2020
{ "path": "@commitlint/lint" },
21+
{ "path": "@commitlint/core" },
2122
]
2223
}

0 commit comments

Comments
 (0)
Please sign in to comment.