mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-27 15:50:29 +00:00
grunt: Update grunt-contrib-jshint use built-in jshintrc parser
Use built-in jshintrc option for 'jshint' config instead of parsing manually and strippig comments. node-jshint itself has supported comment parsing for a long time (which is why our Jenkins build, which doesn't even use grunt, has no problem with our .jshintrc file). But the grunt task never exposed this parser, until v0.6.4. Change-Id: Ia45a44ac49c943845a11d3fc7a0127776e99ed2a
This commit is contained in:
parent
56c50b30b8
commit
561dd7c65b
|
@ -43,8 +43,9 @@ module.exports = function ( grunt ) {
|
|||
}
|
||||
},
|
||||
jshint: {
|
||||
options: JSON.parse( grunt.file.read( '.jshintrc' )
|
||||
.replace( /\/\*(?:(?!\*\/)[\s\S])*\*\//g, '' ).replace( /\/\/[^\n\r]*/g, '' ) ),
|
||||
options: {
|
||||
jshintrc: '.jshintrc'
|
||||
},
|
||||
all: ['*.js', 'modules/{syntaxhighlight,unicodejs,ve,ve-mw}/**/*.js']
|
||||
},
|
||||
jscs: {
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
],
|
||||
"devDependencies": {
|
||||
"grunt": "0.4.2",
|
||||
"grunt-contrib-jshint": "0.5.4",
|
||||
"grunt-contrib-jshint": "0.6.4",
|
||||
"grunt-contrib-csslint": "0.1.2",
|
||||
"grunt-contrib-qunit": "0.2.2",
|
||||
"grunt-contrib-watch": "0.4.4",
|
||||
|
|
Loading…
Reference in a new issue