2019-05-07 00:20:57 +00:00
|
|
|
/* eslint-env node, es6 */
|
2015-06-20 04:57:40 +00:00
|
|
|
module.exports = function ( grunt ) {
|
2019-05-07 00:20:57 +00:00
|
|
|
var conf = grunt.file.readJSON( 'extension.json' );
|
|
|
|
|
|
|
|
grunt.loadNpmTasks( 'grunt-eslint' );
|
2015-06-20 04:57:40 +00:00
|
|
|
grunt.loadNpmTasks( 'grunt-banana-checker' );
|
|
|
|
grunt.loadNpmTasks( 'grunt-jsonlint' );
|
|
|
|
|
|
|
|
grunt.initConfig( {
|
2019-05-07 00:20:57 +00:00
|
|
|
eslint: {
|
2015-10-02 07:48:42 +00:00
|
|
|
options: {
|
2019-05-07 00:20:57 +00:00
|
|
|
reportUnusedDisableDirectives: true,
|
|
|
|
cache: true
|
2015-10-02 07:48:42 +00:00
|
|
|
},
|
|
|
|
all: [
|
2019-05-07 00:20:57 +00:00
|
|
|
'**/*.js',
|
|
|
|
'!{vendor,node_modules}/**'
|
2015-10-02 07:48:42 +00:00
|
|
|
]
|
|
|
|
},
|
2015-06-20 04:57:40 +00:00
|
|
|
banana: conf.MessagesDirs,
|
|
|
|
jsonlint: {
|
|
|
|
all: [
|
|
|
|
'**/*.json',
|
2017-11-08 16:13:24 +00:00
|
|
|
'!node_modules/**',
|
|
|
|
'!vendor/**'
|
2015-06-20 04:57:40 +00:00
|
|
|
]
|
|
|
|
}
|
|
|
|
} );
|
|
|
|
|
2019-05-07 00:20:57 +00:00
|
|
|
grunt.registerTask( 'test', [ 'eslint', 'jsonlint', 'banana' ] );
|
2015-06-20 04:57:40 +00:00
|
|
|
grunt.registerTask( 'default', 'test' );
|
|
|
|
};
|