jenkins-bot has submitted this change and it was merged. ( 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(-) Approvals: BearND: Looks good to me, approved jenkins-bot: Verified 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: merged Gerrit-Change-Id: Ie78d3bed3608adcc2c4bbf38bd0fd981b8c91702 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/mobileapps Gerrit-Branch: master Gerrit-Owner: Mholloway <mhollo...@wikimedia.org> Gerrit-Reviewer: BearND <bsitzm...@wikimedia.org> Gerrit-Reviewer: Fjalapeno <cfl...@wikimedia.org> Gerrit-Reviewer: Jdlrobson <jrob...@wikimedia.org> Gerrit-Reviewer: Mhurd <mh...@wikimedia.org> Gerrit-Reviewer: Ppchelko <ppche...@wikimedia.org> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits