build: Upgrade eslint-config-wikimedia 0.12.0, drop grunt-jsonlint

Change-Id: I13f58204a37fe34b802c1fd481927d1226f77430
This commit is contained in:
James D. Forrester 2019-05-07 09:59:18 -07:00
parent 2edd810306
commit 31c72b5898
3 changed files with 13 additions and 14 deletions

1
.gitignore vendored
View file

@ -4,3 +4,4 @@
composer.lock composer.lock
node_modules/ node_modules/
vendor/ vendor/
.eslintcache

View file

@ -1,15 +1,21 @@
/* eslint-env node */ /* eslint-env node */
module.exports = function ( grunt ) { module.exports = function ( grunt ) {
var conf = grunt.file.readJSON( 'extension.json' ); var conf = grunt.file.readJSON( 'extension.json' );
grunt.loadNpmTasks( 'grunt-banana-checker' ); grunt.loadNpmTasks( 'grunt-banana-checker' );
grunt.loadNpmTasks( 'grunt-eslint' ); grunt.loadNpmTasks( 'grunt-eslint' );
grunt.loadNpmTasks( 'grunt-jsonlint' );
grunt.loadNpmTasks( 'grunt-stylelint' ); grunt.loadNpmTasks( 'grunt-stylelint' );
grunt.initConfig( { grunt.initConfig( {
eslint: { eslint: {
options: {
reportUnusedDisableDirectives: true,
extensions: [ '.js', '.json' ],
cache: true
},
all: [ all: [
'*.js', '**/*.js{,on}',
'modules/*.js', '!{vendor,node_modules}/**',
// Library file // Library file
'!modules/qrcode.js' '!modules/qrcode.js'
] ]
@ -21,15 +27,8 @@ module.exports = function ( grunt ) {
'!vendor/**' '!vendor/**'
] ]
}, },
banana: conf.MessagesDirs, banana: conf.MessagesDirs
jsonlint: {
all: [
'**/*.json',
'!node_modules/**',
'!vendor/**'
]
}
} ); } );
grunt.registerTask( 'test', [ 'eslint', 'stylelint', 'jsonlint', 'banana' ] ); grunt.registerTask( 'test', [ 'eslint', 'stylelint', 'banana' ] );
grunt.registerTask( 'default', 'test' ); grunt.registerTask( 'default', 'test' );
}; };

View file

@ -4,11 +4,10 @@
"test": "grunt test" "test": "grunt test"
}, },
"devDependencies": { "devDependencies": {
"eslint-config-wikimedia": "0.11.0", "eslint-config-wikimedia": "0.12.0",
"grunt": "1.0.4", "grunt": "1.0.4",
"grunt-banana-checker": "0.7.0", "grunt-banana-checker": "0.7.0",
"grunt-eslint": "21.0.0", "grunt-eslint": "21.0.0",
"grunt-jsonlint": "1.1.0",
"grunt-stylelint": "0.10.1", "grunt-stylelint": "0.10.1",
"stylelint-config-wikimedia": "0.5.0" "stylelint-config-wikimedia": "0.5.0"
} }