Thiemo Mättig (WMDE) has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/363796 )

Change subject: Update JSHint
......................................................................

Update JSHint

grunt-contrib-jshint 0.12.0 requires JSHint 2.9, which is needed for
the new "esversion" keyword.

I'm doing the smallest possible step on purpose. Updating
grunt-contrib-jshint to 1.1.0 would be possible, but I believe require
a lot more unrelated changes.

Change-Id: I09d6edb2ee508b71614e322d37f4afe249d5d1fe
---
M .jshintrc
M package.json
M tests/.jshintrc
3 files changed, 5 insertions(+), 9 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikibaseJavaScriptApi 
refs/changes/96/363796/1

diff --git a/.jshintrc b/.jshintrc
index 69b7892..8d85516 100644
--- a/.jshintrc
+++ b/.jshintrc
@@ -3,11 +3,10 @@
        "camelcase": true, // Force variable names to be camelcase
        "curly": true, // Require {} for every new block or scope.
        "eqeqeq": true, // Require triple equals i.e. `===`.
-       "es3": true, // Prohibit trailing comma in object literals (breaks 
older versions of IE)
        "forin": false, // Don't expect `for in` loops to call 
`hasOwnPrototype`.
        "freeze": true, // Prohibit overwriting prototypes of native objects 
such as Array, Date and so on.
        "immed": true, // Require immediate invocations to be wrapped in parens 
e.g. `( function(){}() );`
-       "latedef": true, // Prohibit variable use before definition.
+       "latedef": "nofunc", // Prohibit variable use before definition.
        "newcap": true, // Require capitalization of all constructor functions 
e.g. `new F()`.
        "noarg": true, // Prohibit use of `arguments.caller` and 
`arguments.callee`.
        "noempty": true, // Prohibit use of empty blocks.
@@ -24,8 +23,7 @@
        "boss": false, // Don't tolerate assignments inside if, for & while. 
Usually conditions & loops are for comparison, not assignments.
        "debug": false, // Don't allow debugger statements e.g. browser 
breakpoints.
        "eqnull": false, // Don't tolerate use of `== null`.
-       "es5": false, // Don't allow EcmaScript 5 syntax.
-       "esnext": false, // Don't allow ES.next specific features such as 
`const` and `let`.
+       "esversion": 5,
        "evil": false, // Don't tolerate use of `eval`.
        "expr": false, // Don't tolerate `ExpressionStatement` as Programs.
        "funcscope": false, // Don't tolerate declarations of variables inside 
of control structures while accessing them later from the outside.
diff --git a/package.json b/package.json
index 7b70396..e43a88e 100644
--- a/package.json
+++ b/package.json
@@ -6,7 +6,7 @@
   "devDependencies": {
     "grunt": "0.4.5",
     "grunt-cli": "0.1.13",
-    "grunt-contrib-jshint": "0.11.3",
+    "grunt-contrib-jshint": "0.12.0",
     "grunt-jscs": "2.5.0",
     "grunt-jsonlint": "1.0.7"
   }
diff --git a/tests/.jshintrc b/tests/.jshintrc
index 4084691..cbe4e5c 100644
--- a/tests/.jshintrc
+++ b/tests/.jshintrc
@@ -3,11 +3,10 @@
        "camelcase": true, // Force variable names to be camelcase
        "curly": true, // Require {} for every new block or scope.
        "eqeqeq": true, // Require triple equals i.e. `===`.
-       "es3": true, // Prohibit trailing comma in object literals (breaks 
older versions of IE)
        "forin": false, // Don't expect `for in` loops to call 
`hasOwnPrototype`.
        "freeze": true, // Prohibit overwriting prototypes of native objects 
such as Array, Date and so on.
        "immed": true, // Require immediate invocations to be wrapped in parens 
e.g. `( function(){}() );`
-       "latedef": true, // Prohibit variable use before definition.
+       "latedef": "nofunc", // Prohibit variable use before definition.
        "newcap": true, // Require capitalization of all constructor functions 
e.g. `new F()`.
        "noarg": true, // Prohibit use of `arguments.caller` and 
`arguments.callee`.
        "noempty": true, // Prohibit use of empty blocks.
@@ -24,8 +23,7 @@
        "boss": false, // Don't tolerate assignments inside if, for & while. 
Usually conditions & loops are for comparison, not assignments.
        "debug": false, // Don't allow debugger statements e.g. browser 
breakpoints.
        "eqnull": false, // Don't tolerate use of `== null`.
-       "es5": false, // Don't allow EcmaScript 5 syntax.
-       "esnext": false, // Don't allow ES.next specific features such as 
`const` and `let`.
+       "esversion": 5,
        "evil": false, // Don't tolerate use of `eval`.
        "expr": false, // Don't tolerate `ExpressionStatement` as Programs.
        "funcscope": false, // Don't tolerate declarations of variables inside 
of control structures while accessing them later from the outside.

-- 
To view, visit https://gerrit.wikimedia.org/r/363796
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I09d6edb2ee508b71614e322d37f4afe249d5d1fe
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikibaseJavaScriptApi
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to