From 02ee92510376b23476039e29e1ec5ffaf2102b83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Raphael=20von=20der=20Gr=C3=BCn?= Date: Mon, 21 May 2018 12:02:14 +0200 Subject: [PATCH] Remove obsolete jshint comments (#444) --- bin/templates/cordova/lib/AndroidManifest.js | 4 ---- bin/templates/cordova/lib/AndroidStudio.js | 2 -- bin/templates/cordova/lib/builders/GenericBuilder.js | 2 -- bin/templates/cordova/lib/builders/GradleBuilder.js | 2 -- bin/templates/cordova/lib/check_reqs.js | 2 -- bin/templates/cordova/lib/emulator.js | 2 -- bin/templates/cordova/lib/pluginHandlers.js | 2 -- bin/templates/cordova/lib/retry.js | 2 -- bin/templates/cordova/lib/run.js | 2 -- bin/templates/project/assets/www/cordova.js | 2 -- test/app/src/main/assets/www/cordova.js | 2 -- 11 files changed, 24 deletions(-) diff --git a/bin/templates/cordova/lib/AndroidManifest.js b/bin/templates/cordova/lib/AndroidManifest.js index 5b7077ae58..98f8202666 100644 --- a/bin/templates/cordova/lib/AndroidManifest.js +++ b/bin/templates/cordova/lib/AndroidManifest.js @@ -51,15 +51,11 @@ AndroidManifest.prototype.setVersionCode = function (versionCode) { }; AndroidManifest.prototype.getPackageId = function () { - /* jshint -W069 */ return this.doc.getroot().attrib['package']; - /* jshint +W069 */ }; AndroidManifest.prototype.setPackageId = function (pkgId) { - /* jshint -W069 */ this.doc.getroot().attrib['package'] = pkgId; - /* jshint +W069 */ return this; }; diff --git a/bin/templates/cordova/lib/AndroidStudio.js b/bin/templates/cordova/lib/AndroidStudio.js index 68d4d8f6cf..e04d8a8b17 100644 --- a/bin/templates/cordova/lib/AndroidStudio.js +++ b/bin/templates/cordova/lib/AndroidStudio.js @@ -4,8 +4,6 @@ * @param {String} root Root folder of the project */ -/* jshint esnext: false */ - module.exports.isAndroidStudioProject = function isAndroidStudioProject (root) { return true; }; diff --git a/bin/templates/cordova/lib/builders/GenericBuilder.js b/bin/templates/cordova/lib/builders/GenericBuilder.js index 892aa38f4c..33c40ea20b 100644 --- a/bin/templates/cordova/lib/builders/GenericBuilder.js +++ b/bin/templates/cordova/lib/builders/GenericBuilder.js @@ -109,9 +109,7 @@ function findOutputApksHelper (dir, build_type, arch) { var archSpecific = !!/-x86|-arm/.exec(path.basename(ret[0])); // And show only arch-specific ones (or non-arch-specific) ret = ret.filter(function (p) { - /* jshint -W018 */ return !!/-x86|-arm/.exec(path.basename(p)) === archSpecific; - /* jshint +W018 */ }); if (archSpecific && ret.length > 1 && arch) { diff --git a/bin/templates/cordova/lib/builders/GradleBuilder.js b/bin/templates/cordova/lib/builders/GradleBuilder.js index 30d3c0fbb4..669a35bdab 100644 --- a/bin/templates/cordova/lib/builders/GradleBuilder.js +++ b/bin/templates/cordova/lib/builders/GradleBuilder.js @@ -246,9 +246,7 @@ GradleBuilder.prototype.prepEnv = function (opts) { // If it's not set, do nothing, assuming that we're using a future version of gradle that we don't want to mess with. // For some reason, using ^ and $ don't work. This does the job, though. var distributionUrlRegex = /distributionUrl.*zip/; - /* jshint -W069 */ var distributionUrl = process.env['CORDOVA_ANDROID_GRADLE_DISTRIBUTION_URL'] || 'https\\://services.gradle.org/distributions/gradle-4.4-all.zip'; - /* jshint +W069 */ var gradleWrapperPropertiesPath = path.join(self.root, 'gradle', 'wrapper', 'gradle-wrapper.properties'); shell.chmod('u+w', gradleWrapperPropertiesPath); shell.sed('-i', distributionUrlRegex, 'distributionUrl=' + distributionUrl, gradleWrapperPropertiesPath); diff --git a/bin/templates/cordova/lib/check_reqs.js b/bin/templates/cordova/lib/check_reqs.js index 4a223604d4..2ef5aa8f46 100644 --- a/bin/templates/cordova/lib/check_reqs.js +++ b/bin/templates/cordova/lib/check_reqs.js @@ -19,8 +19,6 @@ under the License. */ -/* jshint sub:true */ - var shelljs = require('shelljs'); var child_process = require('child_process'); var Q = require('q'); diff --git a/bin/templates/cordova/lib/emulator.js b/bin/templates/cordova/lib/emulator.js index 305e2e3d71..82106bb74c 100644 --- a/bin/templates/cordova/lib/emulator.js +++ b/bin/templates/cordova/lib/emulator.js @@ -19,8 +19,6 @@ under the License. */ -/* jshint sub:true */ - var android_versions = require('android-versions'); var retry = require('./retry'); var build = require('./build'); diff --git a/bin/templates/cordova/lib/pluginHandlers.js b/bin/templates/cordova/lib/pluginHandlers.js index b5a46cfed3..f57c28379a 100644 --- a/bin/templates/cordova/lib/pluginHandlers.js +++ b/bin/templates/cordova/lib/pluginHandlers.js @@ -14,8 +14,6 @@ * */ -/* jshint unused: vars */ - var fs = require('fs'); var path = require('path'); var shell = require('shelljs'); diff --git a/bin/templates/cordova/lib/retry.js b/bin/templates/cordova/lib/retry.js index c464b9d5f8..3ea8f1436e 100644 --- a/bin/templates/cordova/lib/retry.js +++ b/bin/templates/cordova/lib/retry.js @@ -19,8 +19,6 @@ under the License. */ -/* jshint node: true */ - 'use strict'; var events = require('cordova-common').events; diff --git a/bin/templates/cordova/lib/run.js b/bin/templates/cordova/lib/run.js index b97fce2038..183fc9224c 100644 --- a/bin/templates/cordova/lib/run.js +++ b/bin/templates/cordova/lib/run.js @@ -19,8 +19,6 @@ under the License. */ -/* jshint loopfunc:true */ - var path = require('path'); var build = require('./build'); var emulator = require('./emulator'); diff --git a/bin/templates/project/assets/www/cordova.js b/bin/templates/project/assets/www/cordova.js index 24400bd6c5..3ae354cd88 100644 --- a/bin/templates/project/assets/www/cordova.js +++ b/bin/templates/project/assets/www/cordova.js @@ -22,8 +22,6 @@ var PLATFORM_VERSION_BUILD_LABEL = '7.2.0-dev'; // file: src/scripts/require.js -/* jshint -W079 */ -/* jshint -W020 */ var require; var define; diff --git a/test/app/src/main/assets/www/cordova.js b/test/app/src/main/assets/www/cordova.js index 1814e0254f..11da9eb0ef 100644 --- a/test/app/src/main/assets/www/cordova.js +++ b/test/app/src/main/assets/www/cordova.js @@ -22,8 +22,6 @@ var PLATFORM_VERSION_BUILD_LABEL = '6.2.0-dev'; // file: src/scripts/require.js -/*jshint -W079 */ -/*jshint -W020 */ var require, define;