Jforrester has uploaded a new change for review. https://gerrit.wikimedia.org/r/268926
Change subject: build: Bump grunt-contrib-jshint from 0.11.3 to 0.12.0 ...................................................................... build: Bump grunt-contrib-jshint from 0.11.3 to 0.12.0 Taking the opportunity to modernise our .jshintrc file, I have made the following changes there and adjusted the repo to pass: * Replaced the deprecated `"es3": true` with `"esversion": 3`; nil change. * Adjusted `"latedef": true` to `"latedef": "nofunc"`, a new setting for this option that lets us retain previous behaviour. One call needed to be adjusted for the update with this change; without it, several dozen were needed. * Added `"futurehostile": true`, to make bumping `esversion` easier in future. I have reviewed the rest of the options and chosen not to apply them: * No need to over-ride the runtime option `maxerr`. * No need to add the additional 'enforcing' options: `forin`, `nocomma`, `nonbsp`, `notypeof`, `predef`, `shadow`, `singleGroups`, `varstmt`. * No need to add the additional 'relaxing' options, as ideally we should use none: `asi`, `boss`, `debug`, `elision`, `eqnull`, `evil`, `expr`, `lastsemic`, `loopfunc`, `moz`, `noyield`, `plusplus`, `proto`, `scripturl`, `supernew`, `validthis`, `withstmt` * Definitely no need to add any of the deprecated coding style-related items: `camelcase`, `curly`, `immed`, `indent`, `laxcomma`, `maxlen`, `maxcomplexity`, `maxdepth`, `maxparams`, `maxstatements`, `newcap`, `noempty`, `quotmark`, `sub` Note that we retain two deprecated options, `laxbreak` and `multistr` which are set to be removed in the next major version of jshint but are as-yet required for the repo so that it passes. Change-Id: I2a780f655010f2231ab2ab93c40b34943828b4df --- M .jshintrc M package.json M resources/src/mediawiki.special/mediawiki.special.apisandbox.js M resources/src/mediawiki/mediawiki.feedback.js 4 files changed, 10 insertions(+), 9 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/26/268926/1 diff --git a/.jshintrc b/.jshintrc index b776e8f..62b9d82 100644 --- a/.jshintrc +++ b/.jshintrc @@ -2,14 +2,15 @@ // Enforcing "bitwise": true, "eqeqeq": true, - "es3": true, + "esversion": 3, "freeze": true, - "latedef": true, + "futurehostile": true, + "latedef": "nofunc", "noarg": true, "nonew": true, + "strict": false, "undef": true, "unused": true, - "strict": false, // Relaxing "laxbreak": true, diff --git a/package.json b/package.json index 0a45e9a..33a2039 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "grunt-cli": "0.1.13", "grunt-banana-checker": "0.4.0", "grunt-contrib-copy": "0.8.2", - "grunt-contrib-jshint": "0.11.3", + "grunt-contrib-jshint": "0.12.0", "grunt-contrib-watch": "0.6.1", "grunt-jscs": "2.7.0", "grunt-jsonlint": "1.0.7", diff --git a/resources/src/mediawiki.special/mediawiki.special.apisandbox.js b/resources/src/mediawiki.special/mediawiki.special.apisandbox.js index 32ccdcd..10664fa 100644 --- a/resources/src/mediawiki.special/mediawiki.special.apisandbox.js +++ b/resources/src/mediawiki.special/mediawiki.special.apisandbox.js @@ -1058,6 +1058,10 @@ ApiSandbox.PageLayout.prototype.loadParamInfo = function () { var dynamicFieldset, dynamicParamNameWidget, that = this, + removeDynamicParamWidget = function ( name, layout ) { + dynamicFieldset.removeItems( [ layout ] ); + delete that.widgets[ name ]; + }, addDynamicParamWidget = function () { var name, layout, widget, button; @@ -1109,10 +1113,6 @@ widget.focus(); dynamicParamNameWidget.setValue( '' ); - }, - removeDynamicParamWidget = function ( name, layout ) { - dynamicFieldset.removeItems( [ layout ] ); - delete that.widgets[ name ]; }; this.$element.empty() diff --git a/resources/src/mediawiki/mediawiki.feedback.js b/resources/src/mediawiki/mediawiki.feedback.js index 97a94b8..8a3784c 100644 --- a/resources/src/mediawiki/mediawiki.feedback.js +++ b/resources/src/mediawiki/mediawiki.feedback.js @@ -6,7 +6,7 @@ * @author Moriel Schottlender, 2015 * @since 1.19 */ -/*jshint es3:false */ +/*jshint esversion:5 */ /*global OO*/ ( function ( mw, $ ) { /** -- To view, visit https://gerrit.wikimedia.org/r/268926 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2a780f655010f2231ab2ab93c40b34943828b4df Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Jforrester <jforres...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits