Skip to content
This repository has been archived by the owner on Mar 29, 2022. It is now read-only.

Commit

Permalink
Revert "Use ESLint instead of JSHint"
Browse files Browse the repository at this point in the history
This reverts commit d7ecb98.
Seems like the version of Node.js preinstalled in our Travis images
is too old for this version of ESLint,
and this is not interesting enough for me to investigate/fix.
  • Loading branch information
vfaronov committed Aug 12, 2016
1 parent a123031 commit 3b0f037
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 30 deletions.
24 changes: 0 additions & 24 deletions .eslintrc.js

This file was deleted.

4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ install:
- pip install -e .
- pip install -r tools/requirements.txt
- tools/vnu.sh install
- tools/eslint.sh install
- tools/jshint.sh install

cache: pip

Expand All @@ -40,7 +40,7 @@ script:
# This includes validating an actual HTML report (``showcase.html``).
- tools/vnu.sh run extra_doc/_build/*.html
- tools/css_validator.sh httpolice/reports/html.css
- tools/eslint.sh run httpolice/reports/html.js
- tools/jshint.sh run httpolice/reports/html.js

# Although the main docs (``doc/``) are processed by Read the Docs,
# we still want to check that they are building OK.
Expand Down
5 changes: 5 additions & 0 deletions httpolice/reports/html.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/* jshint browser: true */
/* jshint -W097 */

'use strict';

function collapseAll() {
Expand All @@ -8,6 +11,7 @@ function collapseAll() {
}

function onButtonClick() {
/* jshint -W040 */
this.parentElement.classList.toggle('collapsed');
}

Expand All @@ -23,6 +27,7 @@ function installButtons() {
}

function highlightReferences() {
/* jshint -W040 */
var i, referrers, refs, exchange, target;

// Collect references from all contributing elements within this notice.
Expand Down
8 changes: 4 additions & 4 deletions tools/eslint.sh → tools/jshint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

set -e

VERSION=3.2.2
BASE=$HOME/install-eslint
VERSION=2.9.2
BASE=$HOME/install-jshint

action=$1
shift
Expand All @@ -13,10 +13,10 @@ case $action in
rm -rf "$BASE"
mkdir "$BASE"
cd "$BASE"
npm install eslint@$VERSION
npm install jshint@$VERSION
;;

run)
"$BASE/node_modules/.bin/eslint" "$@"
"$BASE/node_modules/.bin/jshint" "$@"
;;
esac

0 comments on commit 3b0f037

Please sign in to comment.