build: Work around jshint failure for global JSON object
authorRoan Kattouw <roan.kattouw@gmail.com>
Fri, 27 Feb 2015 19:04:52 +0000 (11:04 -0800)
committerJforrester <jforrester@wikimedia.org>
Fri, 27 Feb 2015 19:17:08 +0000 (19:17 +0000)
jshint is now failing with errors about how it doesn't
recognize the global 'JSON' object, even though we have
browser:true set. This worked in 2.6.0 but broke in 2.6.1.

Other people have reported similar but different problems with
jshint: https://github.com/jshint/jshint/issues/2213 .
It looks like 2.6.1 is a seriously broken release, but we
can't work around it in package.json because grunt-contrib-jshint
depends on 2.6.*, assuming that point releases are backwards
compatible. Which they should be.

Change-Id: I85bcf1c97f2f8c82e139ebf2f1b6c4248b72f45e

.jshintrc

index 92c8c43..d77ffb8 100644 (file)
--- a/.jshintrc
+++ b/.jshintrc
@@ -20,6 +20,7 @@
 
        "globals": {
                "mediaWiki": true,
+               "JSON": true,
                "jQuery": false,
                "QUnit": false
        }