Paladox has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/227430

Change subject: Add jsonlint to grunt
......................................................................

Add jsonlint to grunt

Adds jsonlint to grunt

Change-Id: Ibfedfe05eb1b1ff5ce647ea3dc95498753ca0b5d
---
A .jshintrc
M Gruntfile.js
A i18n/de.json
A i18n/es.json
M i18n/qqq.json
M package.json
6 files changed, 67 insertions(+), 24 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikidataPageBanner 
refs/changes/30/227430/1

diff --git a/.jshintrc b/.jshintrc
new file mode 100644
index 0000000..82721ad
--- /dev/null
+++ b/.jshintrc
@@ -0,0 +1,19 @@
+{
+       // Enforcing
+       "bitwise": true,
+       "eqeqeq": true,
+       "freeze": true,
+       "latedef": true,
+       "noarg": true,
+       "nonew": true,
+       "undef": true,
+       "unused": false,
+       "strict": false,
+
+       // Relaxing
+       "es5": false,
+
+       // Environment
+       "browser": true,
+       "jquery": true
+}
diff --git a/Gruntfile.js b/Gruntfile.js
index dba7fa6..1e63211 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -1,22 +1,28 @@
 module.exports = function ( grunt ) {
-  grunt.loadNpmTasks( 'grunt-banana-checker' );
-  grunt.loadNpmTasks( 'grunt-contrib-jshint' );
+       grunt.loadNpmTasks( 'grunt-contrib-jshint' );
+       grunt.loadNpmTasks( 'grunt-jsonlint' );
+       grunt.loadNpmTasks( 'grunt-banana-checker' );
 
-  grunt.initConfig( {
-    jshint: {
-      options: {
-        jshintrc: true
-      },
-      all: [
-        'Gruntfile.js',
-        'resources',
-      ],
-    },
-    banana: {
-      all: 'i18n/'
-    },
-  } );
+       grunt.initConfig( {
+               jshint: {
+                       options: {
+                               jshintrc: true
+                       },
+                       all: [
+                               '*.js'
+                       ]
+               },
+               banana: {
+                       all: 'i18n/'
+               },
+               jsonlint: {
+                       all: [
+                               '**/*.json',
+                               '!node_modules/**'
+                       ]
+               }
+       } );
 
-  grunt.registerTask( 'test', [ 'jshint', 'banana' ] );
-  grunt.registerTask( 'default', 'test' );
+       grunt.registerTask( 'test', [ 'jshint', 'jsonlint', 'banana' ] );
+       grunt.registerTask( 'default', 'test' );
 };
diff --git a/i18n/de.json b/i18n/de.json
new file mode 100644
index 0000000..e662c51
--- /dev/null
+++ b/i18n/de.json
@@ -0,0 +1,9 @@
+{
+       "@metadata": {
+               "authors": [
+                       "Metalhead64"
+               ]
+       },
+       "wikidatapagebanner-extname": "WikidataPageBanner",
+       "wikidatapagebanner-desc": "Rendert Banner auf angegebenen Wikiseiten 
am Artikelanfang"
+}
diff --git a/i18n/es.json b/i18n/es.json
new file mode 100644
index 0000000..0d3478a
--- /dev/null
+++ b/i18n/es.json
@@ -0,0 +1,9 @@
+{
+       "@metadata": {
+               "authors": [
+                       "Macofe"
+               ]
+       },
+       "wikidatapagebanner-extname": "WikidataPageBanner",
+       "wikidatapagebanner-desc": "Despliega pancartas en páginas 
especificadas del wiki, al principio de los artículos"
+}
diff --git a/i18n/qqq.json b/i18n/qqq.json
index b3061d4..8f1f695 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -1,7 +1,5 @@
 {
-       "@metadata": {
-               "authors": []
-       },
+       "@metadata": [],
        "wikidatapagebanner-extname": "Used for the name of extension.",
        "wikidatapagebanner-desc": 
"{{desc|name=WikidataPageBanner|url=https://www.mediawiki.org/wiki/Extension:WikidataPageBanner}}";
-}
\ No newline at end of file
+}
diff --git a/package.json b/package.json
index c14a4cb..0d58125 100644
--- a/package.json
+++ b/package.json
@@ -9,7 +9,9 @@
   "devDependencies": {
     "grunt": "0.4.5",
     "grunt-cli": "0.1.13",
-    "grunt-banana-checker": "0.2.1",
-    "grunt-contrib-jshint": "0.11.2"
+    "grunt-contrib-jshint": "0.11.2",
+    "grunt-banana-checker": "0.2.2",
+    "grunt-jsonlint": "1.0.4"
   }
 }
+

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibfedfe05eb1b1ff5ce647ea3dc95498753ca0b5d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikidataPageBanner
Gerrit-Branch: master
Gerrit-Owner: Paladox <thomasmulhall...@yahoo.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to