From eff59ac2dda578639c65c45bf0d33a30c37ceb18 Mon Sep 17 00:00:00 2001 From: Michael Krotscheck Date: Fri, 26 Jun 2015 14:30:00 -0700 Subject: [PATCH] Removed JSHint JSHint is being deprecated by the Horizon project. This removes all references, commands, and documentation related to this tool. The patch depends on the deactivation patch for jshint in infra. Change-Id: I1a799f39023e0598a58d912a4288300ec8340dd9 Depends-on: Ifb59af36ae37926133769c655e54f4c2e1edf095 Partially-Implements: blueprint jscs-cleanup --- .jshintignore | 1 - .jshintrc | 42 ------------------- .../framework/widgets/table/table.spec.js | 1 - .../framework/widgets/toast/toast.factory.js | 1 - horizon/static/horizon/js/horizon.js | 2 +- run_tests.sh | 17 -------- tox.ini | 6 --- 7 files changed, 1 insertion(+), 69 deletions(-) delete mode 100644 .jshintignore delete mode 100644 .jshintrc diff --git a/.jshintignore b/.jshintignore deleted file mode 100644 index 6a9459de37..0000000000 --- a/.jshintignore +++ /dev/null @@ -1 +0,0 @@ -horizon/static/horizon/lib/ \ No newline at end of file diff --git a/.jshintrc b/.jshintrc deleted file mode 100644 index ce33442d6c..0000000000 --- a/.jshintrc +++ /dev/null @@ -1,42 +0,0 @@ -{ - "browser": true, - "trailing": true, - "evil": true, - "unused": true, - "undef": true, - - "globals": { - "horizon": false, - "jQuery": false, - "$": false, - - "angular": false, - "module": false, - "inject": false, - - "describe": false, - "beforeEach": false, - "afterEach": false, - "beforeAll": false, - "afterAll": false, - "it": false, - "expect": false, - "fail": false, - "spyOn": false, - "jasmine": false, - - "d3": false, - "test": false, - "equal": false, - "ok": false, - - "pluralidx": false, - "gettext": false, - "ngettext": false, - "gettext_noop": false, - "pgettext": false, - "npgettext": false, - "interpolate": false, - "get_format": false - } -} diff --git a/horizon/static/framework/widgets/table/table.spec.js b/horizon/static/framework/widgets/table/table.spec.js index 2c7a655b20..ae56371dcc 100644 --- a/horizon/static/framework/widgets/table/table.spec.js +++ b/horizon/static/framework/widgets/table/table.spec.js @@ -1,4 +1,3 @@ -/* jshint browser: true */ (function() { 'use strict'; diff --git a/horizon/static/framework/widgets/toast/toast.factory.js b/horizon/static/framework/widgets/toast/toast.factory.js index 3f54738c9e..f3e5f6b0db 100644 --- a/horizon/static/framework/widgets/toast/toast.factory.js +++ b/horizon/static/framework/widgets/toast/toast.factory.js @@ -88,7 +88,6 @@ function add(type, msg) { var toast = { type: type === 'error' ? 'danger' : type, - /* jshint validthis:true */ typeMsg: this.types[type], msg: msg, cancel: cancel diff --git a/horizon/static/horizon/js/horizon.js b/horizon/static/horizon/js/horizon.js index ae6a8fe353..3caf127ee1 100644 --- a/horizon/static/horizon/js/horizon.js +++ b/horizon/static/horizon/js/horizon.js @@ -42,4 +42,4 @@ var Horizon = function () { }; // Create the one and only horizon object. -var horizon = new Horizon(); // jshint ignore:line +var horizon = new Horizon(); diff --git a/run_tests.sh b/run_tests.sh index 9642520560..241c972118 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -26,7 +26,6 @@ function usage { echo " -P, --no-pep8 Don't run pep8 by default" echo " -t, --tabs Check for tab characters in files." echo " -y, --pylint Just run pylint" - echo " -j, --jshint Just run jshint" echo " -e, --eslint Just run eslint" echo " -k, --karma Just run karma" echo " -q, --quiet Run non-interactively. (Relatively) quiet." @@ -72,7 +71,6 @@ just_pylint=0 just_docs=0 just_tabs=0 just_eslint=0 -just_jshint=0 just_karma=0 never_venv=0 quiet=0 @@ -109,7 +107,6 @@ function process_option { -8|--pep8-changed) just_pep8_changed=1;; -P|--no-pep8) no_pep8=1;; -y|--pylint) just_pylint=1;; - -j|--jshint) just_jshint=1;; -e|--eslint) just_eslint=1;; -k|--karma) just_karma=1;; -f|--force) force=1;; @@ -159,14 +156,6 @@ function run_pylint { fi } -function run_jshint { - echo "Running jshint ..." - jshint horizon/static/horizon/js - jshint horizon/static/horizon/tests - jshint horizon/static/framework/ - jshint openstack_dashboard/static/dashboard/ -} - function run_eslint { echo "Running eslint ..." if [ "`which npm`" == '' ] ; then @@ -583,12 +572,6 @@ if [ $just_pylint -eq 1 ]; then exit $? fi -# Jshint -if [ $just_jshint -eq 1 ]; then - run_jshint - exit $? -fi - # ESLint if [ $just_eslint -eq 1 ]; then run_eslint diff --git a/tox.ini b/tox.ini index 3e424f9253..de75a7239a 100644 --- a/tox.ini +++ b/tox.ini @@ -44,12 +44,6 @@ commands = pip install django>=1.5,<1.6 basepython = python2.7 commands = /bin/bash run_tests.sh -N --integration --selenium-headless {posargs} -[testenv:jshint] -passenv = * -commands = nodeenv -p - npm install jshint -g - /bin/bash run_tests.sh -N --jshint - [testenv:eslint] passenv = * commands = nodeenv -p