Skip to content

Commit

Permalink
refactor(core): port core to typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
armano2 committed Feb 6, 2020
1 parent f6b0021 commit 1e0bb97
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 5 deletions.
4 changes: 0 additions & 4 deletions @commitlint/core/index.js

This file was deleted.

4 changes: 3 additions & 1 deletion @commitlint/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
"name": "@commitlint/core",
"version": "8.3.5",
"description": "Lint your commit messages",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"files": [
"index.js"
"lib/"
],
"scripts": {
"deps": "dep-check",
Expand Down
11 changes: 11 additions & 0 deletions @commitlint/core/src/index.ts
Original file line number Diff line number Diff line change
@@ -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
};
10 changes: 10 additions & 0 deletions @commitlint/core/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": "../../tsconfig.shared.json",
"compilerOptions": {
"composite": true,
"rootDir": "./src",
"outDir": "./lib"
},
"include": ["./src/**/*.ts"],
"exclude": ["./src/**/*.test.ts", "./lib/**/*"]
}
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@
{ "path": "@commitlint/read" },
{ "path": "@commitlint/rules" },
{ "path": "@commitlint/lint" },
{ "path": "@commitlint/core" },
]
}

0 comments on commit 1e0bb97

Please sign in to comment.