From 1cc79a0b19cea0e259728b1a2f71cee45f61c3fb Mon Sep 17 00:00:00 2001 From: Michael Krotscheck Date: Fri, 5 Jun 2015 09:56:50 -0700 Subject: [PATCH] Added `npm run lint` command to execute JSCS This patch adds jscs as an npm dependency, and executes it within the npm venv. It can be used to trigger the infra npm-run-lint job and thus get voting javascript code linting into infra. Change-Id: I2c92a7596a8faee28de582493bdf72425deac8cc --- package.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index a431e24586..a3f77e961e 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "license": "Apache 2.0", "devDependencies": { "jasmine-core": "2.2.0", + "jscs": "1.13.1", "karma": "0.12.31", "karma-chrome-launcher": "0.1.8", "karma-cli": "0.0.4", @@ -18,7 +19,8 @@ }, "scripts": { "postinstall": "if [ ! -d .venv ]; then tox -epy27 --notest; fi", - "test": "karma start horizon/karma.conf.js --single-run && karma start openstack_dashboard/karma.conf.js --single-run" + "test": "karma start horizon/karma.conf.js --single-run && karma start openstack_dashboard/karma.conf.js --single-run", + "lint": "jscs --no-colors horizon/static/horizon/js horizon/static/horizon/tests horizon/static/framework/ openstack_dashboard/static/dashboard/" }, "dependencies": {} }