2017-01-18 12:52:44 +00:00
|
|
|
/* eslint-env node */
|
2015-10-13 21:11:33 +00:00
|
|
|
module.exports = function ( grunt ) {
|
|
|
|
grunt.loadNpmTasks( 'grunt-banana-checker' );
|
2017-01-18 12:52:44 +00:00
|
|
|
grunt.loadNpmTasks( 'grunt-eslint' );
|
|
|
|
grunt.loadNpmTasks( 'grunt-stylelint' );
|
2015-10-13 21:11:33 +00:00
|
|
|
|
|
|
|
grunt.initConfig( {
|
2017-01-18 12:52:44 +00:00
|
|
|
eslint: {
|
2019-02-10 15:44:37 +00:00
|
|
|
options: {
|
2019-04-03 22:54:28 +00:00
|
|
|
reportUnusedDisableDirectives: true,
|
2019-05-06 22:31:16 +00:00
|
|
|
extensions: [ '.js', '.json' ],
|
2019-04-03 22:54:28 +00:00
|
|
|
cache: true
|
2019-02-10 15:44:37 +00:00
|
|
|
},
|
2015-10-13 21:11:33 +00:00
|
|
|
all: [
|
2019-05-06 22:31:16 +00:00
|
|
|
'**/*.js{,on}',
|
|
|
|
'!{vendor,node_modules}/**'
|
2015-10-13 21:11:33 +00:00
|
|
|
]
|
|
|
|
},
|
2017-01-18 12:52:44 +00:00
|
|
|
stylelint: {
|
|
|
|
all: [
|
|
|
|
'**/*.css',
|
2019-01-18 17:13:17 +00:00
|
|
|
'**/*.less',
|
2017-08-19 07:42:18 +00:00
|
|
|
'!node_modules/**',
|
|
|
|
'!vendor/**'
|
2017-01-18 12:52:44 +00:00
|
|
|
]
|
2015-10-28 19:51:13 +00:00
|
|
|
},
|
2017-01-28 18:08:39 +00:00
|
|
|
banana: {
|
|
|
|
all: [
|
|
|
|
'i18n/',
|
|
|
|
'**/i18n/'
|
|
|
|
]
|
2015-10-13 21:11:33 +00:00
|
|
|
}
|
|
|
|
} );
|
|
|
|
|
2019-05-06 22:31:16 +00:00
|
|
|
grunt.registerTask( 'test', [ 'eslint', 'stylelint', 'banana' ] );
|
2015-10-13 21:11:33 +00:00
|
|
|
grunt.registerTask( 'default', 'test' );
|
|
|
|
};
|