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

Change subject: build: Add grunt-tyops and make pass
......................................................................


build: Add grunt-tyops and make pass

Change-Id: I91310976a2d3a82ba213c89fc8a033db8679b035
---
M Gruntfile.js
M build/tasks/git-build.js
A build/typos.json
M package.json
4 files changed, 33 insertions(+), 2 deletions(-)

Approvals:
  Alex Monk: Looks good to me, approved
  Jforrester: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/Gruntfile.js b/Gruntfile.js
index d5ed800..488bc8f 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -37,6 +37,7 @@
        grunt.loadNpmTasks( 'grunt-cssjanus' );
        grunt.loadNpmTasks( 'grunt-jscs' );
        grunt.loadNpmTasks( 'grunt-karma' );
+       grunt.loadNpmTasks( 'grunt-tyops' );
        grunt.loadTasks( 'build/tasks' );
 
        // We want to use `grunt watch` to start this and karma watch together.
@@ -234,6 +235,19 @@
                                indent: '\t\t'
                        }
                },
+               tyops: {
+                       options: {
+                               typos: 'build/typos.json'
+                       },
+                       src: [
+                               '**/*.{js,json,less,css,txt}',
+                               '!build/typos.json',
+                               '!lib/**',
+                               '!i18n/**',
+                               '!{coverage,dist,docs,node_modules}/**',
+                               '!.git/**'
+                       ]
+               },
                jshint: {
                        options: {
                                jshintrc: true
@@ -341,7 +355,7 @@
        } );
 
        grunt.registerTask( 'build', [ 'clean', 'concat', 'cssjanus', 
'cssUrlEmbed', 'copy', 'buildloader' ] );
-       grunt.registerTask( 'lint', [ 'jshint', 'jscs:main', 'csslint', 
'jsonlint', 'banana' ] );
+       grunt.registerTask( 'lint', [ 'tyops', 'jshint', 'jscs:main', 
'csslint', 'jsonlint', 'banana' ] );
        grunt.registerTask( 'unit', [ 'karma:main' ] );
        grunt.registerTask( 'fix', [ 'jscs:fix' ] );
        grunt.registerTask( '_test', [ 'lint', 'git-build', 'build', 'unit' ] );
diff --git a/build/tasks/git-build.js b/build/tasks/git-build.js
index 7d34e06..6c949b3 100644
--- a/build/tasks/git-build.js
+++ b/build/tasks/git-build.js
@@ -14,7 +14,7 @@
                                return;
                        }
                        grunt.config.set( 'pkg.version', grunt.config( 
'pkg.version' ) + '-pre (' + stout.slice( 0, 10 ) + ')' );
-                       grunt.verbose.writeln( 'Added git HEAD to pgk.version' 
);
+                       grunt.verbose.writeln( 'Added git HEAD to pkg.version' 
);
                        done();
                } );
        } );
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 99aab3d..594af13 100644
--- a/package.json
+++ b/package.json
@@ -30,6 +30,7 @@
     "grunt-jsonlint": "1.0.4",
     "grunt-contrib-watch": "0.6.1",
     "grunt-css-url-embed": "1.6.1",
+    "grunt-tyops": "0.1.0",
     "grunt-cssjanus": "0.2.4",
     "grunt-jscs": "2.1.0",
     "grunt-karma": "0.12.1",

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

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

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

Reply via email to