Skip to content

Commit

Permalink
feat: 添加代码提交格式化测试
Browse files Browse the repository at this point in the history
  • Loading branch information
申远 committed Sep 1, 2021
1 parent 209726e commit a1a9640
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx commitlint -e $HUSKY_GIT_PARAMS
npx --no-install commitlint --edit $1
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"

npm run lint-staged
npx lint-staged
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,13 @@
# lib-start
使用Rollup构建类库模板

使用 `Rollup` 构建开箱即用的类库模板,使用`typescript`进行开发

## 安装

```
npm install
// or
yarn
```

## usage
8 changes: 7 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"scripts": {
"build": "rm -rf dist && npx rollup -c rollup.config.js",
"test": "jest --coverage --verbose -u",
"lint-staged": "npx eslint --fix src/**/*.ts",
"release": "standard-version"
},
"dependencies": {},
Expand All @@ -35,5 +34,12 @@
"ts-jest": "^27.0.5",
"tslib": "^2.3.1",
"typescript": "^4.3.5"
},
"lint-staged": {
"src/**/*.{js,ts}": [
"prettier --write",
"npx eslint --fix",
"git add"
]
}
}

0 comments on commit a1a9640

Please sign in to comment.