Use the pluggable eslint instead of jshint
We likely have to write some plugins, or configure it better, but that will be a different patch. Change-Id: I71eb341af45dc529a3d84467d7252b3d64b1e56d
This commit is contained in:
parent
b3c49ab78a
commit
6ee771a4e2
20
run_tests.sh
20
run_tests.sh
@ -27,7 +27,7 @@ function usage {
|
||||
echo " -p, --pep8 Just run pep8"
|
||||
echo " -t, --tabs Check for tab characters in files."
|
||||
echo " -y, --pylint Just run pylint"
|
||||
echo " -j, --jshint Just run jshint"
|
||||
echo " -j, --jshint --eslint Just run eslint"
|
||||
echo " -q, --quiet Run non-interactively. (Relatively) quiet."
|
||||
echo " Implies -V if -N is not set."
|
||||
echo " --only-selenium Run only the Selenium unit tests"
|
||||
@ -65,7 +65,7 @@ just_pep8=0
|
||||
just_pylint=0
|
||||
just_docs=0
|
||||
just_tabs=0
|
||||
just_jshint=0
|
||||
just_eslint=0
|
||||
never_venv=0
|
||||
quiet=0
|
||||
restore_env=0
|
||||
@ -98,7 +98,7 @@ function process_option {
|
||||
-N|--no-virtual-env) always_venv=0; never_venv=1;;
|
||||
-p|--pep8) just_pep8=1;;
|
||||
-y|--pylint) just_pylint=1;;
|
||||
-j|--jshint) just_jshint=1;;
|
||||
-j|--jshint|--eslint) just_eslint=1;;
|
||||
-f|--force) force=1;;
|
||||
-t|--tabs) just_tabs=1;;
|
||||
-q|--quiet) quiet=1;;
|
||||
@ -143,10 +143,10 @@ function run_pylint {
|
||||
fi
|
||||
}
|
||||
|
||||
function run_jshint {
|
||||
echo "Running jshint ..."
|
||||
jshint tuskar_boxes
|
||||
jshint tuskar_sat_ui
|
||||
function run_eslint {
|
||||
echo "Running eslint ..."
|
||||
eslint tuskar_boxes
|
||||
eslint tuskar_sat_ui
|
||||
}
|
||||
|
||||
function run_pep8 {
|
||||
@ -454,9 +454,9 @@ if [ $just_tabs -eq 1 ]; then
|
||||
exit $?
|
||||
fi
|
||||
|
||||
# Jshint
|
||||
if [ $just_jshint -eq 1 ]; then
|
||||
run_jshint
|
||||
# Linting JS
|
||||
if [ $just_eslint -eq 1 ]; then
|
||||
run_eslint
|
||||
exit $?
|
||||
fi
|
||||
|
||||
|
8
tox.ini
8
tox.ini
@ -1,5 +1,5 @@
|
||||
[tox]
|
||||
envlist = py26,py27,py27dj14,py27dj15,py27dj16,pep8,selenium,jshint
|
||||
envlist = py26,py27,py27dj14,py27dj15,py27dj16,pep8,selenium,eslint
|
||||
|
||||
[testenv]
|
||||
setenv = VIRTUAL_ENV={envdir}
|
||||
@ -39,10 +39,10 @@ commands = pip install django>=1.6,<1.7
|
||||
[testenv:selenium]
|
||||
commands = /bin/bash run_tests.sh -N --only-selenium
|
||||
|
||||
[testenv:jshint]
|
||||
[testenv:eslint]
|
||||
commands = nodeenv -p
|
||||
npm install jshint -g
|
||||
/bin/bash run_tests.sh -N --jshint
|
||||
npm install eslint -g
|
||||
/bin/bash run_tests.sh -N --eslint
|
||||
|
||||
[tox:jenkins]
|
||||
downloadcache = ~/cache/pip
|
||||
|
Loading…
Reference in New Issue
Block a user