Skip to content

Commit

Permalink
refactor: port core to typescript (#961)
Browse files Browse the repository at this point in the history
* refactor(core): port core to typescript

* refactor(core): rename file and fix formatting
  • Loading branch information
armano2 committed Feb 6, 2020
1 parent 5281822 commit b5ba369
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
Expand Up @@ -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",
Expand Down
11 changes: 11 additions & 0 deletions @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
};
10 changes: 10 additions & 0 deletions @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/**/*"]
}
1 change: 1 addition & 0 deletions tsconfig.json
Expand Up @@ -18,5 +18,6 @@
{ "path": "@commitlint/read" },
{ "path": "@commitlint/rules" },
{ "path": "@commitlint/lint" },
{ "path": "@commitlint/core" },
]
}

0 comments on commit b5ba369

Please sign in to comment.