Skip to content

Commit

Permalink
update files
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenjoezhang committed Mar 11, 2023
1 parent 0913097 commit 66c1a39
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 7 deletions.
12 changes: 8 additions & 4 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
{
"extends": "hexo",
"root": true
}
{
"root": true,
"extends": "hexo/ts.js",
"parserOptions": {
"sourceType": "module",
"ecmaVersion": 2020
}
}
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
#npx lint-staged
14 changes: 12 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@
"hexo": "./bin/hexo"
},
"scripts": {
"prepublish ": "npm run clean && npm run build",
"build": "tsc -b",
"clean": "tsc -b --clean",
"eslint": "eslint .",
"test": "mocha test/index.js",
"pretest": "npm run clean && npm run build",
"test": "mocha test/index.js --require ts-node/register",
"test-cov": "c8 --reporter=lcovonly npm test -- --no-parallel",
"prepare": "husky install"
},
Expand Down Expand Up @@ -66,6 +70,10 @@
},
"devDependencies": {
"@easyops/git-exec-and-restage": "^1.0.4",
"@types/bluebird": "^3.5.37",
"@types/node": "^18.11.8",
"@typescript-eslint/eslint-plugin": "^5.41.0",
"@typescript-eslint/parser": "^5.41.0",
"0x": "^5.1.2",
"c8": "^7.12.0",
"chai": "^4.3.6",
Expand All @@ -77,7 +85,9 @@
"husky": "^8.0.1",
"lint-staged": "^13.0.3",
"mocha": "^10.0.0",
"sinon": "^15.0.0"
"sinon": "^15.0.0",
"ts-node": "^10.9.1",
"typescript": "^4.8.4"
},
"engines": {
"node": ">=14"
Expand Down
19 changes: 19 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"sourceMap": true,
"outDir": "dist",
"declaration": true,
"esModuleInterop": true,
"types": [
"node"
]
},
"include": [
"lib/hexo/index.ts"
],
"exclude": [
"node_modules"
]
}

0 comments on commit 66c1a39

Please sign in to comment.