2019-05-06 23:25:17 +00:00
|
|
|
/* eslint-env node, es6 */
|
2015-06-17 19:11:19 +00:00
|
|
|
module.exports = function ( grunt ) {
|
2015-07-16 19:12:37 +00:00
|
|
|
var conf = grunt.file.readJSON( 'extension.json' );
|
2019-05-06 23:25:17 +00:00
|
|
|
|
2015-07-16 19:12:37 +00:00
|
|
|
grunt.loadNpmTasks( 'grunt-banana-checker' );
|
2019-05-06 23:25:17 +00:00
|
|
|
grunt.loadNpmTasks( 'grunt-eslint' );
|
2017-04-17 20:15:03 +00:00
|
|
|
grunt.loadNpmTasks( 'grunt-stylelint' );
|
2015-06-17 19:11:19 +00:00
|
|
|
|
|
|
|
grunt.initConfig( {
|
2019-05-06 23:25:17 +00:00
|
|
|
eslint: {
|
2015-07-16 19:12:37 +00:00
|
|
|
options: {
|
2019-05-06 23:25:17 +00:00
|
|
|
reportUnusedDisableDirectives: true,
|
2019-05-06 23:26:39 +00:00
|
|
|
extensions: [ '.js', '.json' ],
|
2019-05-06 23:25:17 +00:00
|
|
|
cache: true
|
2015-07-16 19:12:37 +00:00
|
|
|
},
|
|
|
|
all: [
|
2019-05-06 23:26:39 +00:00
|
|
|
'**/*.js{,on}',
|
2019-05-06 23:25:17 +00:00
|
|
|
'!{vendor,node_modules}/**'
|
2015-07-16 19:12:37 +00:00
|
|
|
]
|
|
|
|
},
|
2015-06-17 19:11:19 +00:00
|
|
|
banana: conf.MessagesDirs,
|
2017-04-17 20:15:03 +00:00
|
|
|
stylelint: {
|
|
|
|
all: [
|
|
|
|
'**/*.css',
|
2017-08-19 07:49:58 +00:00
|
|
|
'!node_modules/**',
|
|
|
|
'!vendor/**'
|
2015-06-17 19:11:19 +00:00
|
|
|
]
|
|
|
|
}
|
|
|
|
} );
|
|
|
|
|
2019-05-06 23:26:39 +00:00
|
|
|
grunt.registerTask( 'test', [ 'eslint', 'banana', 'stylelint' ] );
|
2015-06-17 19:11:19 +00:00
|
|
|
grunt.registerTask( 'default', 'test' );
|
|
|
|
};
|