Skip to content

Commit

Permalink
Separate npm run lint command
Browse files Browse the repository at this point in the history
  • Loading branch information
chovanecm committed May 2, 2017
1 parent 2ad430f commit 80a8500
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 deletions.
11 changes: 10 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
matrix:
include:
- language: node_js
env: TOX_ENV=qunit
env:
- INFO=JavaScriptTests
node_js: "7"
before_script:
- npm install
script:
- npm test
- language: node_js
env:
- INFO=JavaScriptStyleCheck
node_js: "7"
before_script:
- npm install
script:
- npm run lint
language: python
python: "3.5"
git:
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

],
"scripts": {
"test": "cd sacredboard/static/scripts/tests && qunit node_tests.js && eslint \"../**/*.js\""
"test": "cd sacredboard/static/scripts/tests && qunit node_tests.js",
"lint": "eslint \"sacredboard/static/scripts/**/*.js\""
}
}
9 changes: 8 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# and then run "tox" from this directory.

[tox]
envlist = py34, py35, flake8, qunit
envlist = py34, py35, flake8, qunit, eslint

[testenv]
commands = {envpython} setup.py test --addopts -v
Expand Down Expand Up @@ -33,3 +33,10 @@ whitelist_externals=
commands =
npm install
npm test

[testenv:eslint]
whitelist_externals=
npm
commands =
npm install
npm run lint

0 comments on commit 80a8500

Please sign in to comment.