diff --git a/Gruntfile.js b/Gruntfile.js index 9f34d13b57721..139cb6fb5b286 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -1761,6 +1761,7 @@ module.exports = function(grunt) { grunt.registerTask( 'precommit:js', [ 'webpack:prod', 'jshint:corejs', + 'lint:jsdoc', 'typecheck:js', 'uglify:imgareaselect', 'uglify:jqueryform', @@ -2318,6 +2319,18 @@ module.exports = function(grunt) { } ); } ); + grunt.registerTask( 'lint:jsdoc', 'Runs JSDoc linting on JavaScript files.', function() { + var done = this.async(); + + grunt.util.spawn( { + cmd: 'npm', + args: [ 'run', 'lint:jsdoc' ], + opts: { stdio: 'inherit' } + }, function( error ) { + done( ! error ); + } ); + } ); + grunt.registerTask( 'phpstan', 'Runs PHPStan on the entire codebase.', function() { var done = this.async();