mirror of
https://github.com/modood/Administrative-divisions-of-China.git
synced 2026-02-02 18:21:12 +08:00
使用 husky 强制代码提交前必须通过测试
This commit is contained in:
18
.eslintrc.js
18
.eslintrc.js
@@ -2,14 +2,14 @@ module.exports = {
|
||||
root: true,
|
||||
extends: 'standard',
|
||||
globals: {
|
||||
'describe': true,
|
||||
'it': true,
|
||||
'before': true,
|
||||
'beforeEach': true,
|
||||
'after': true,
|
||||
'afterEach': true,
|
||||
'context': true,
|
||||
'expect': true
|
||||
// mocha BDD
|
||||
describe: true,
|
||||
context: true,
|
||||
it: true,
|
||||
specify: true,
|
||||
before: true,
|
||||
beforeEach: true,
|
||||
after: true,
|
||||
afterEach: true
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
10
package.json
10
package.json
@@ -4,7 +4,8 @@
|
||||
"description": "中华人民共和国行政区划:省份、城市、区县、乡镇(街道)",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "mocha -t 5000"
|
||||
"test": "eslint . && mocha -t 5000",
|
||||
"precommit": "npm test"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@@ -33,6 +34,13 @@
|
||||
"iconv-lite": "^0.4.15"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "^3.19.0",
|
||||
"eslint-config-standard": "^10.2.1",
|
||||
"eslint-plugin-import": "^2.3.0",
|
||||
"eslint-plugin-node": "^4.2.2",
|
||||
"eslint-plugin-promise": "^3.5.0",
|
||||
"eslint-plugin-standard": "^3.0.1",
|
||||
"husky": "^0.13.4",
|
||||
"mocha": "^3.1.0"
|
||||
},
|
||||
"license": "MIT",
|
||||
|
||||
Reference in New Issue
Block a user