Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/380843 )

Change subject: Add grunt-jsonlint and grunt-banana-checker
......................................................................

Add grunt-jsonlint and grunt-banana-checker

jsonlint and banana-checker will test for valid i18n files

Run eslint over grunt

Bug: T94547

Change-Id: Id7386a839b763e35bc0d285adc98f169a22e8030
---
A Gruntfile.js
M i18n/ce.json
M i18n/ckb.json
M i18n/en.json
M i18n/ig.json
M i18n/lv.json
M i18n/mt.json
M i18n/nds.json
M i18n/or.json
M i18n/so.json
M i18n/ta.json
M i18n/te.json
M package.json
13 files changed, 125 insertions(+), 94 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DataTypes 
refs/changes/43/380843/1

diff --git a/Gruntfile.js b/Gruntfile.js
new file mode 100644
index 0000000..fc50f9d
--- /dev/null
+++ b/Gruntfile.js
@@ -0,0 +1,28 @@
+module.exports = function ( grunt ) {
+       grunt.loadNpmTasks( 'grunt-eslint' );
+       grunt.loadNpmTasks( 'grunt-jsonlint' );
+       grunt.loadNpmTasks( 'grunt-banana-checker' );
+
+       grunt.initConfig( {
+               eslint: {
+                       all: [
+                               '**/*.js',
+                               '!node_modules/**',
+                               '!vendor/**'
+                       ]
+               },
+               banana: {
+                       all: 'i18n/'
+               },
+               jsonlint: {
+                       all: [
+                               '**/*.json',
+                               '!node_modules/**',
+                               '!vendor/**'
+                       ]
+               }
+       } );
+
+       grunt.registerTask( 'test', [ 'jsonlint', 'banana', 'eslint' ] );
+       grunt.registerTask( 'default', 'test' );
+};
diff --git a/i18n/ce.json b/i18n/ce.json
index 2d4aca5..a3b0a73 100644
--- a/i18n/ce.json
+++ b/i18n/ce.json
@@ -1,9 +1,9 @@
 {
-    "@metadata": {
-        "authors": [
-            "Умар"
-        ]
-    },
-    "datatypes-type-globe-coordinate": "Географин координаташ",
-    "datatypes-type-time": "Хан"
+       "@metadata": {
+               "authors": [
+                       "Умар"
+               ]
+       },
+       "datatypes-type-globe-coordinate": "Географин координаташ",
+       "datatypes-type-time": "Хан"
 }
\ No newline at end of file
diff --git a/i18n/ckb.json b/i18n/ckb.json
index 62c7600..982637d 100644
--- a/i18n/ckb.json
+++ b/i18n/ckb.json
@@ -1,9 +1,9 @@
 {
-    "@metadata": {
-        "authors": [
-            "Calak"
-        ]
-    },
-    "datatypes-type-string": "زنجیرەنووسە",
-    "datatypes-type-time": "کات"
+       "@metadata": {
+               "authors": [
+                       "Calak"
+               ]
+       },
+       "datatypes-type-string": "زنجیرەنووسە",
+       "datatypes-type-time": "کات"
 }
\ No newline at end of file
diff --git a/i18n/en.json b/i18n/en.json
index 7070e1e..49f72e1 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -1,18 +1,18 @@
 {
-    "@metadata": {
-        "authors": [
-            "Jeroen De Dauw"
-        ]
-    },
-    "datatypes-desc": "Collection of data type definitions",
-    "datatypes-type-string": "String",
-    "datatypes-type-quantity": "Quantity",
-    "datatypes-type-monolingualtext": "Monolingual text",
-    "datatypes-type-multilingualtext": "Multilingual text",
-    "datatypes-type-number": "Number",
-    "datatypes-type-mediawiki-title": "MediaWiki title",
-    "datatypes-type-unknown": "Unspecified",
-    "datatypes-type-boolean": "Boolean",
-    "datatypes-type-globe-coordinate": "Geographic coordinates",
-    "datatypes-type-time": "Point in time"
+       "@metadata": {
+               "authors": [
+                       "Jeroen De Dauw"
+               ]
+       },
+       "datatypes-desc": "Collection of data type definitions",
+       "datatypes-type-string": "String",
+       "datatypes-type-quantity": "Quantity",
+       "datatypes-type-monolingualtext": "Monolingual text",
+       "datatypes-type-multilingualtext": "Multilingual text",
+       "datatypes-type-number": "Number",
+       "datatypes-type-mediawiki-title": "MediaWiki title",
+       "datatypes-type-unknown": "Unspecified",
+       "datatypes-type-boolean": "Boolean",
+       "datatypes-type-globe-coordinate": "Geographic coordinates",
+       "datatypes-type-time": "Point in time"
 }
diff --git a/i18n/ig.json b/i18n/ig.json
index d39243a..45fbefc 100644
--- a/i18n/ig.json
+++ b/i18n/ig.json
@@ -1,8 +1,8 @@
 {
-    "@metadata": {
-        "authors": [
-            "Ukabia"
-        ]
-    },
-    "datatypes-type-number": "Ọ́nụ́ọ̀gụ̀gụ̀"
+       "@metadata": {
+               "authors": [
+                       "Ukabia"
+               ]
+       },
+       "datatypes-type-number": "Ọ́nụ́ọ̀gụ̀gụ̀"
 }
\ No newline at end of file
diff --git a/i18n/lv.json b/i18n/lv.json
index 2c3a678..47f23b8 100644
--- a/i18n/lv.json
+++ b/i18n/lv.json
@@ -1,8 +1,8 @@
 {
-    "@metadata": {
-        "authors": [
-            "Papuass"
-        ]
-    },
-    "datatypes-type-globe-coordinate": "Ģeogrāfiskās koordinātas"
+       "@metadata": {
+               "authors": [
+                       "Papuass"
+               ]
+       },
+       "datatypes-type-globe-coordinate": "Ģeogrāfiskās koordinātas"
 }
\ No newline at end of file
diff --git a/i18n/mt.json b/i18n/mt.json
index 035870e..950d5ae 100644
--- a/i18n/mt.json
+++ b/i18n/mt.json
@@ -1,8 +1,8 @@
 {
-    "@metadata": {
-        "authors": [
-            "Chrisportelli"
-        ]
-    },
-    "datatypes-type-number": "Numru"
+       "@metadata": {
+               "authors": [
+                       "Chrisportelli"
+               ]
+       },
+       "datatypes-type-number": "Numru"
 }
\ No newline at end of file
diff --git a/i18n/nds.json b/i18n/nds.json
index 80f2470..28c843d 100644
--- a/i18n/nds.json
+++ b/i18n/nds.json
@@ -1,9 +1,9 @@
 {
-    "@metadata": {
-        "authors": [
-            "Joachim Mos"
-        ]
-    },
-    "datatypes-type-boolean": "Boolean",
-    "datatypes-type-time": "Tied"
+       "@metadata": {
+               "authors": [
+                       "Joachim Mos"
+               ]
+       },
+       "datatypes-type-boolean": "Boolean",
+       "datatypes-type-time": "Tied"
 }
\ No newline at end of file
diff --git a/i18n/or.json b/i18n/or.json
index 7c7fd4a..8fc2911 100644
--- a/i18n/or.json
+++ b/i18n/or.json
@@ -1,9 +1,9 @@
 {
-    "@metadata": {
-        "authors": [
-            "Ansumang"
-        ]
-    },
-    "datatypes-type-quantity": "ପରିମାଣ",
-    "datatypes-type-number": "ନମ୍ବର"
+       "@metadata": {
+               "authors": [
+                       "Ansumang"
+               ]
+       },
+       "datatypes-type-quantity": "ପରିମାଣ",
+       "datatypes-type-number": "ନମ୍ବର"
 }
\ No newline at end of file
diff --git a/i18n/so.json b/i18n/so.json
index df6cd87..4f1aeef 100644
--- a/i18n/so.json
+++ b/i18n/so.json
@@ -1,9 +1,9 @@
 {
-    "@metadata": {
-        "authors": [
-            "Abshirdheere"
-        ]
-    },
-    "datatypes-type-quantity": "Tayo",
-    "datatypes-type-number": "Tiro"
+       "@metadata": {
+               "authors": [
+                       "Abshirdheere"
+               ]
+       },
+       "datatypes-type-quantity": "Tayo",
+       "datatypes-type-number": "Tiro"
 }
\ No newline at end of file
diff --git a/i18n/ta.json b/i18n/ta.json
index b6dad47..1ecc86a 100644
--- a/i18n/ta.json
+++ b/i18n/ta.json
@@ -1,13 +1,13 @@
 {
-    "@metadata": {
-        "authors": [
-            "Shanmugamp7"
-        ]
-    },
-    "datatypes-type-quantity": "அளவு",
-    "datatypes-type-monolingual-text": "ஒரு மொழி உரை",
-    "datatypes-type-multilingual-text": "பன்மொழி உரை",
-    "datatypes-type-number": "எண்",
-    "datatypes-type-mediawiki-title": "மீடியாவிக்கி தலைப்பு",
-    "datatypes-type-unknown": "குறிப்பிடப்படவில்லை"
+       "@metadata": {
+               "authors": [
+                       "Shanmugamp7"
+               ]
+       },
+       "datatypes-type-quantity": "அளவு",
+       "datatypes-type-monolingual-text": "ஒரு மொழி உரை",
+       "datatypes-type-multilingual-text": "பன்மொழி உரை",
+       "datatypes-type-number": "எண்",
+       "datatypes-type-mediawiki-title": "மீடியாவிக்கி தலைப்பு",
+       "datatypes-type-unknown": "குறிப்பிடப்படவில்லை"
 }
\ No newline at end of file
diff --git a/i18n/te.json b/i18n/te.json
index c907fa3..86b656d 100644
--- a/i18n/te.json
+++ b/i18n/te.json
@@ -1,14 +1,14 @@
 {
-    "@metadata": {
-        "authors": [
-            "Veeven"
-        ]
-    },
-    "datatypes-type-string": "పదబంధం",
-    "datatypes-type-quantity": "రాశి",
-    "datatypes-type-monolingual-text": "ఏకభాషా పాఠ్యం",
-    "datatypes-type-multilingual-text": "పలు భాషల పాఠ్యం",
-    "datatypes-type-number": "సంఖ్య",
-    "datatypes-type-mediawiki-title": "మీడియావికీ శీర్షిక",
-    "datatypes-type-time": "సమయం"
+       "@metadata": {
+               "authors": [
+                       "Veeven"
+               ]
+       },
+       "datatypes-type-string": "పదబంధం",
+       "datatypes-type-quantity": "రాశి",
+       "datatypes-type-monolingual-text": "ఏకభాషా పాఠ్యం",
+       "datatypes-type-multilingual-text": "పలు భాషల పాఠ్యం",
+       "datatypes-type-number": "సంఖ్య",
+       "datatypes-type-mediawiki-title": "మీడియావికీ శీర్షిక",
+       "datatypes-type-time": "సమయం"
 }
\ No newline at end of file
diff --git a/package.json b/package.json
index 9c7280b..6e5f771 100644
--- a/package.json
+++ b/package.json
@@ -11,6 +11,9 @@
   "devDependencies": {
     "eslint": "^3.19.0",
     "eslint-config-wikimedia": "0.4.0",
+    "grunt": "1.0.1",
+    "grunt-banana-checker": "0.6.0",
+    "grunt-jsonlint": "1.1.0",
     "karma": "^1.7.0",
     "karma-cli": "^1.0.1",
     "karma-phantomjs-launcher": "^1.0.4",
@@ -18,8 +21,8 @@
     "qunitjs": "^2.3.2"
   },
   "scripts": {
-    "test": "npm run eslint && npm run run-tests",
-    "eslint": "eslint .",
+    "test": "npm run grunt && npm run run-tests",
+    "grunt": "grunt test",
     "run-tests": "karma start --single-run"
   }
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id7386a839b763e35bc0d285adc98f169a22e8030
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DataTypes
Gerrit-Branch: master
Gerrit-Owner: Umherirrender <umherirrender_de...@web.de>

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

Reply via email to