Mholloway has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/395155 )
Change subject: Dev: Lint on pre-commit, not when running unit tests
......................................................................
Dev: Lint on pre-commit, not when running unit tests
Linting is important but can be a nuisance during a rapid debugging and
testing cycle if run alongside the unit tests. This patch moves the lint
command to a pre-commit hook to ameliorate this problem.
Change-Id: Ie78d3bed3608adcc2c4bbf38bd0fd981b8c91702
---
M package.json
1 file changed, 4 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/mobileapps
refs/changes/55/395155/1
diff --git a/package.json b/package.json
index 99133cf..9e916e9 100644
--- a/package.json
+++ b/package.json
@@ -5,7 +5,7 @@
"main": "./app.js",
"scripts": {
"start": "service-runner",
- "test": "npm run -s lint && PREQ_CONNECT_TIMEOUT=15 mocha && nsp check",
+ "test": "PREQ_CONNECT_TIMEOUT=15 mocha && nsp check",
"test:unit": "PREQ_CONNECT_TIMEOUT=15 mocha test/lib",
"lint": "eslint --cache --max-warnings 0 --ext .js --ext .json .",
"docker-start": "service-runner docker-start",
@@ -13,6 +13,9 @@
"test-build": "service-runner docker-test && service-runner build
--deploy-repo --force",
"coverage": "istanbul cover _mocha -- -R spec"
},
+ "pre-commit": [
+ "lint"
+ ],
"repository": {
"type": "git",
"url": "https://gerrit.wikimedia.org/r/mediawiki/services/mobileapps"
--
To view, visit https://gerrit.wikimedia.org/r/395155
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie78d3bed3608adcc2c4bbf38bd0fd981b8c91702
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/mobileapps
Gerrit-Branch: master
Gerrit-Owner: Mholloway <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits