2018-11-23 15:44:58 +00:00
|
|
|
/* eslint-env node, es6 */
|
2016-02-29 19:48:14 +00:00
|
|
|
module.exports = function ( grunt ) {
|
2018-03-19 16:07:25 +00:00
|
|
|
var conf = grunt.file.readJSON( 'extension.json' );
|
|
|
|
|
2016-12-23 20:04:34 +00:00
|
|
|
grunt.loadNpmTasks( 'grunt-banana-checker' );
|
2018-02-07 21:08:04 +00:00
|
|
|
grunt.loadNpmTasks( 'grunt-eslint' );
|
2018-11-23 15:44:58 +00:00
|
|
|
grunt.loadNpmTasks( 'grunt-jsonlint' );
|
2017-04-16 17:53:12 +00:00
|
|
|
grunt.loadNpmTasks( 'grunt-stylelint' );
|
2016-02-29 19:48:14 +00:00
|
|
|
|
|
|
|
grunt.initConfig( {
|
2018-02-07 21:08:04 +00:00
|
|
|
jsonlint: {
|
2016-02-29 19:48:14 +00:00
|
|
|
all: [
|
2018-02-07 21:08:04 +00:00
|
|
|
'**/*.json',
|
2017-08-19 06:52:42 +00:00
|
|
|
'!node_modules/**',
|
|
|
|
'!vendor/**'
|
2016-02-29 19:48:14 +00:00
|
|
|
]
|
|
|
|
},
|
2018-03-19 16:07:25 +00:00
|
|
|
banana: conf.MessagesDirs,
|
2018-02-07 21:08:04 +00:00
|
|
|
eslint: {
|
2019-04-03 22:44:45 +00:00
|
|
|
options: {
|
|
|
|
reportUnusedDisableDirectives: true,
|
|
|
|
cache: true
|
|
|
|
},
|
2016-02-29 19:48:14 +00:00
|
|
|
all: [
|
2018-02-07 21:08:04 +00:00
|
|
|
'**/*.js',
|
2017-08-19 06:52:42 +00:00
|
|
|
'!node_modules/**',
|
|
|
|
'!vendor/**'
|
2017-04-16 17:53:12 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
stylelint: {
|
|
|
|
all: [
|
|
|
|
'**/*.css',
|
2017-08-19 06:52:42 +00:00
|
|
|
'!node_modules/**',
|
|
|
|
'!vendor/**'
|
2016-02-29 19:48:14 +00:00
|
|
|
]
|
|
|
|
}
|
|
|
|
} );
|
|
|
|
|
2018-02-07 21:08:04 +00:00
|
|
|
grunt.registerTask( 'test', [ 'jsonlint', 'banana', 'eslint', 'stylelint' ] );
|
2016-02-29 19:48:14 +00:00
|
|
|
grunt.registerTask( 'default', 'test' );
|
|
|
|
};
|