jenkins-bot has submitted this change and it was merged. (
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(-)
Approvals:
Lucas Werkmeister (WMDE): Looks good to me, approved
jenkins-bot: Verified
diff --git a/.jshintrc b/.jshintrc
index 69b7892..22d9a4f 100644
--- a/.jshintrc
+++ b/.jshintrc
@@ -3,11 +3,11 @@
"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)
+ "esversion": 5,
"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 +24,6 @@
"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`.
"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..8f7e16a 100644
--- a/tests/.jshintrc
+++ b/tests/.jshintrc
@@ -3,11 +3,11 @@
"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)
+ "esversion": 5,
"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 +24,6 @@
"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`.
"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: merged
Gerrit-Change-Id: I09d6edb2ee508b71614e322d37f4afe249d5d1fe
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/WikibaseJavaScriptApi
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) <[email protected]>
Gerrit-Reviewer: Jonas Kress (WMDE) <[email protected]>
Gerrit-Reviewer: Lucas Werkmeister (WMDE) <[email protected]>
Gerrit-Reviewer: Thiemo Mättig (WMDE) <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits