jenkins-bot has submitted this change and it was merged.

Change subject: build: Add grunt-tyops
......................................................................


build: Add grunt-tyops

Change-Id: Idb30814e69356eb2b3282fae018c142295df922f
---
M Gruntfile.js
A build/typos.json
M package.json
3 files changed, 32 insertions(+), 2 deletions(-)

Approvals:
  Alex Monk: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/Gruntfile.js b/Gruntfile.js
index cec332e..21cd04a 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -15,6 +15,7 @@
        grunt.loadNpmTasks( 'grunt-jsonlint' );
        grunt.loadNpmTasks( 'grunt-banana-checker' );
        grunt.loadNpmTasks( 'grunt-jscs' );
+       grunt.loadNpmTasks( 'grunt-tyops' );
        grunt.loadTasks( 'lib/ve/build/tasks' );
        grunt.loadTasks( 'build/tasks' );
 
@@ -50,6 +51,18 @@
                                pathPrefix: 'lib/ve/',
                                indent: '\t\t'
                        }
+               },
+               tyops: {
+                       options: {
+                               typos: 'build/typos.json'
+                       },
+                       src: [
+                               '**/*.{js,json,less,css,txt}',
+                               '!build/typos.json',
+                               '!lib/**',
+                               '!{docs,node_modules,vendor}/**',
+                               '!.git/**'
+                       ]
                },
                jshint: {
                        options: {
@@ -129,7 +142,7 @@
        } );
 
        grunt.registerTask( 'build', [ 'jsduckcatconfig', 'buildloader' ] );
-       grunt.registerTask( 'lint', [ 'jshint', 'jscs:main', 'csslint', 
'jsonlint', 'banana' ] );
+       grunt.registerTask( 'lint', [ 'tyops', 'jshint', 'jscs:main', 
'csslint', 'jsonlint', 'banana' ] );
        grunt.registerTask( 'fix', [ 'jscs:fix' ] );
        grunt.registerTask( 'test', [ 'build', 'lint' ] );
        grunt.registerTask( 'test-ci', [ 'git-status' ] );
diff --git a/build/typos.json b/build/typos.json
new file mode 100644
index 0000000..b9a8e62
--- /dev/null
+++ b/build/typos.json
@@ -0,0 +1,16 @@
+{
+       "caseInsensitive": [
+               [ "paralell", "parallel" ],
+               [ "properites", "properties" ],
+               [ "visiblit(ies|y)", "visibilit$1" ],
+               [ "movablilties", "movabilities" ],
+               [ "inpsect(ors?|ion)", "inspect$1" ],
+               [ "\bteh\b", "the" ],
+               [ "intialization", "initialization" ],
+               [ "durring", "during" ],
+               [ "contian", "contain" ],
+               [ "occured", "occurred" ],
+               [ "pgk", "pkg" ],
+               [ "arrray", "array" ]
+       ]
+}
diff --git a/package.json b/package.json
index 9fc0467..4aa0e90 100644
--- a/package.json
+++ b/package.json
@@ -17,6 +17,7 @@
     "grunt-contrib-csslint": "0.5.0",
     "grunt-contrib-jshint": "0.11.3",
     "grunt-contrib-watch": "0.6.1",
-    "grunt-jscs": "2.1.0"
+    "grunt-jscs": "2.1.0",
+    "grunt-tyops": "0.1.0"
   }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idb30814e69356eb2b3282fae018c142295df922f
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Jforrester <[email protected]>
Gerrit-Reviewer: Alex Monk <[email protected]>
Gerrit-Reviewer: Esanders <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to