diff --git a/.travis.yml b/.travis.yml index 5133d5e..b296379 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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: diff --git a/package.json b/package.json index d737e58..7946535 100644 --- a/package.json +++ b/package.json @@ -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\"" } } diff --git a/tox.ini b/tox.ini index 5a7dae6..4cea80d 100644 --- a/tox.ini +++ b/tox.ini @@ -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 @@ -33,3 +33,10 @@ whitelist_externals= commands = npm install npm test + +[testenv:eslint] +whitelist_externals= + npm +commands = + npm install + npm run lint