From 0a5d15db503f56c717fbd1b4feb630034753dda9 Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Sat, 9 Jan 2016 20:06:03 -0700 Subject: [PATCH] Remove jshint --- .jshintrc | 5 ----- Makefile | 14 ++------------ package.json | 1 - src/ol/format/gpxformat.js | 2 -- src/ol/source/imagewmssource.js | 2 -- src/ol/source/tilewmssource.js | 2 -- tasks/.jshintrc | 22 ---------------------- tasks/build-examples.js | 2 -- 8 files changed, 2 insertions(+), 48 deletions(-) delete mode 100644 .jshintrc delete mode 100644 tasks/.jshintrc diff --git a/.jshintrc b/.jshintrc deleted file mode 100644 index 036fde760a..0000000000 --- a/.jshintrc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "-W030": true, - "-W083": true, - "-W069": true -} diff --git a/Makefile b/Makefile index 568f68ad45..b8d3db1ce9 100644 --- a/Makefile +++ b/Makefile @@ -94,7 +94,7 @@ compile-examples: build/compiled-examples/all.combined.js .PHONY: clean clean: rm -f build/timestamps/gjslint-timestamp - rm -f build/timestamps/jshint-timestamp + rm -f build/timestamps/eslint-timestamp rm -f build/timestamps/check-*-timestamp rm -f build/ol.css rm -f build/ol.js @@ -121,8 +121,7 @@ install: build/timestamps/node-modules-timestamp .PHONY: lint lint: build/timestamps/gjslint-timestamp \ - build/timestamps/eslint-timestamp \ - build/timestamps/jshint-timestamp \ + build/timestamps/eslint-timestamp \ build/timestamps/check-requires-timestamp \ build/timestamps/check-whitespace-timestamp @@ -281,15 +280,6 @@ build/timestamps/eslint-timestamp: $(SRC_JS) $(SPEC_JS) $(SPEC_RENDERING_JS) \ @./node_modules/.bin/eslint $? @touch $@ -build/timestamps/jshint-timestamp: $(SRC_JS) $(SPEC_JS) $(SPEC_RENDERING_JS) \ - $(TASKS_JS) $(EXAMPLES_JS) \ - examples/resources/common.js \ - build/timestamps/node-modules-timestamp - @mkdir -p $(@D) - @echo "Running jshint..." - @./node_modules/.bin/jshint --verbose $? - @touch $@ - build/timestamps/node-modules-timestamp: package.json @mkdir -p $(@D) npm install diff --git a/package.json b/package.json index 54cbce421c..9a3e7d3c65 100644 --- a/package.json +++ b/package.json @@ -60,7 +60,6 @@ "gaze": "^0.5.1", "istanbul": "0.4.1", "jquery": "2.1.4", - "jshint": "2.8.0", "mocha": "2.3.4", "mocha-phantomjs-core": "^1.3.0", "mustache": "2.2.1", diff --git a/src/ol/format/gpxformat.js b/src/ol/format/gpxformat.js index 51b6aed20f..2fbe20962a 100644 --- a/src/ol/format/gpxformat.js +++ b/src/ol/format/gpxformat.js @@ -551,7 +551,6 @@ ol.format.GPX.writeWptType_ = function(node, coordinate, objectStack) { ol.xml.setAttributeNS(node, null, 'lat', coordinate[1]); ol.xml.setAttributeNS(node, null, 'lon', coordinate[0]); var geometryLayout = context['geometryLayout']; - /* jshint -W086 */ switch (geometryLayout) { case ol.geom.GeometryLayout.XYZM: if (coordinate[3] !== 0) { @@ -571,7 +570,6 @@ ol.format.GPX.writeWptType_ = function(node, coordinate, objectStack) { default: // pass } - /* jshint +W086 */ var orderedKeys = ol.format.GPX.WPT_TYPE_SEQUENCE_[namespaceURI]; var values = ol.xml.makeSequence(properties, orderedKeys); ol.xml.pushSerializeAndPop(/** @type {ol.xml.NodeStackItem} */ diff --git a/src/ol/source/imagewmssource.js b/src/ol/source/imagewmssource.js index 94bb75b553..7b41f7591a 100644 --- a/src/ol/source/imagewmssource.js +++ b/src/ol/source/imagewmssource.js @@ -276,9 +276,7 @@ ol.source.ImageWMS.prototype.getRequestUrl_ = function(extent, size, pixelRatio, params[this.v13_ ? 'CRS' : 'SRS'] = projection.getCode(); if (!('STYLES' in this.params_)) { - /* jshint -W053 */ params['STYLES'] = new String(''); - /* jshint +W053 */ } if (pixelRatio != 1) { diff --git a/src/ol/source/tilewmssource.js b/src/ol/source/tilewmssource.js index e4044f541d..56f42d6bcb 100644 --- a/src/ol/source/tilewmssource.js +++ b/src/ol/source/tilewmssource.js @@ -220,9 +220,7 @@ ol.source.TileWMS.prototype.getRequestUrl_ = function(tileCoord, tileSize, tileE params[this.v13_ ? 'CRS' : 'SRS'] = projection.getCode(); if (!('STYLES' in this.params_)) { - /* jshint -W053 */ params['STYLES'] = new String(''); - /* jshint +W053 */ } if (pixelRatio != 1) { diff --git a/tasks/.jshintrc b/tasks/.jshintrc deleted file mode 100644 index 3c2c4aa041..0000000000 --- a/tasks/.jshintrc +++ /dev/null @@ -1,22 +0,0 @@ -{ - "curly": true, - "eqeqeq": true, - "indent": 2, - "latedef": true, - "newcap": true, - "nonew": true, - "quotmark": "single", - "undef": true, - "trailing": true, - "maxlen": 80, - "globals": { - "Buffer": false, - "__dirname": false, - "__filename": false, - "exports": true, - "module": false, - "process": false, - "require": false, - "setImmediate": false - } -} diff --git a/tasks/build-examples.js b/tasks/build-examples.js index 2a14ac6196..25e8eb7628 100644 --- a/tasks/build-examples.js +++ b/tasks/build-examples.js @@ -7,9 +7,7 @@ var marked = require('marked'); var pkg = require('../package.json'); var markupRegEx = /([^\/^\.]*)\.html$/; -/* jshint -W101 */ var cleanupJSRegEx = /.*(\/\/ NOCOMPILE|goog\.require\(.*\);|.*renderer: common\..*,?)[\n]*/g; -/* jshint +W101 */ var requiresRegEx = /.*goog\.require\('(ol\.\S*)'\);/g; var isCssRegEx = /\.css$/; var isJsRegEx = /\.js$/;