Recommended by `npm audit`. This required also adding postcss-less and changing Grunt configuration to support it. Change-Id: I22861dcdf761068ce37ed1b03c6bbfba1247860a
37 lines
706 B
JavaScript
37 lines
706 B
JavaScript
/* eslint-env node, es6 */
|
|
module.exports = function ( grunt ) {
|
|
var conf = grunt.file.readJSON( 'extension.json' );
|
|
|
|
grunt.loadNpmTasks( 'grunt-banana-checker' );
|
|
grunt.loadNpmTasks( 'grunt-eslint' );
|
|
grunt.loadNpmTasks( 'grunt-stylelint' );
|
|
|
|
grunt.initConfig( {
|
|
eslint: {
|
|
options: {
|
|
cache: true,
|
|
fix: grunt.option( 'fix' )
|
|
},
|
|
all: [
|
|
'.'
|
|
]
|
|
},
|
|
stylelint: {
|
|
options: {
|
|
customSyntax: 'postcss-less'
|
|
},
|
|
src: [
|
|
'**/*.css',
|
|
'**/*.less',
|
|
'!lib/**',
|
|
'!node_modules/**',
|
|
'!vendor/**'
|
|
]
|
|
},
|
|
banana: conf.MessagesDirs
|
|
} );
|
|
|
|
grunt.registerTask( 'test', [ 'eslint', 'stylelint', 'banana' ] );
|
|
grunt.registerTask( 'default', [ 'test' ] );
|
|
};
|