Skip to content

Commit 6b1e892

Browse files
author
lijialiang
committed
feat: format:check
1 parent ac11f32 commit 6b1e892

File tree

2 files changed

+1014
-18
lines changed

2 files changed

+1014
-18
lines changed

package.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
},
2020
"homepage": "https://github.com/svga/SVGAPlayer-Web-Lite/#readme",
2121
"scripts": {
22+
"format:check": "eslint",
2223
"test": "cross-env NODE_ENV=test rollup -c -w",
2324
"clean": "rimraf dist",
2425
"build:umd": "cross-env FORMAT=umd rollup -c",
@@ -36,6 +37,8 @@
3637
"devDependencies": {
3738
"@babel/core": "^7.5.5",
3839
"@babel/preset-env": "^7.5.5",
40+
"@commitlint/cli": "^13.1.0",
41+
"@commitlint/config-conventional": "^13.1.0",
3942
"@rollup/plugin-babel": "^5.3.0",
4043
"@rollup/plugin-commonjs": "^19.0.0",
4144
"@rollup/plugin-node-resolve": "^13.0.0",
@@ -49,6 +52,7 @@
4952
"eslint-plugin-promise": "^4.2.1",
5053
"fs-extra": "^10.0.0",
5154
"glob": "^7.1.7",
55+
"lint-staged": "^11.1.1",
5256
"npm-run-all": "^4.1.5",
5357
"protobufjs": "git+https://github.com/lijialiang/protobuf.js.git",
5458
"rimraf": "^3.0.2",
@@ -61,6 +65,21 @@
6165
"rollup-plugin-typescript2": "^0.30.0",
6266
"tslib": "^2.3.0",
6367
"typescript": "^4.3.5",
68+
"yorkie": "^2.0.0",
6469
"zlibjs": "git+https://github.com/lijialiang/zlib.js.git#esm"
70+
},
71+
"lint-staged": {
72+
"./src/**/*.{js,ts}": [
73+
"npm run format:check"
74+
]
75+
},
76+
"commitlint": {
77+
"extends": [
78+
"@commitlint/config-conventional"
79+
]
80+
},
81+
"gitHooks": {
82+
"pre-commit": "lint-staged",
83+
"commit-msg": "commitlint -e $GIT_PARAMS"
6584
}
6685
}

0 commit comments

Comments
 (0)