diff options
Diffstat (limited to 'Echo/Gruntfile.js')
-rw-r--r-- | Echo/Gruntfile.js | 37 |
1 files changed, 16 insertions, 21 deletions
diff --git a/Echo/Gruntfile.js b/Echo/Gruntfile.js index 2df0b98d..bdf44714 100644 --- a/Echo/Gruntfile.js +++ b/Echo/Gruntfile.js @@ -1,22 +1,23 @@ -/* eslint-env node */ +/* eslint-env node, es6 */ module.exports = function ( grunt ) { var conf = grunt.file.readJSON( 'extension.json' ); grunt.loadNpmTasks( 'grunt-banana-checker' ); grunt.loadNpmTasks( 'grunt-contrib-watch' ); grunt.loadNpmTasks( 'grunt-eslint' ); - grunt.loadNpmTasks( 'grunt-jsonlint' ); grunt.loadNpmTasks( 'grunt-stylelint' ); grunt.loadNpmTasks( 'grunt-svgmin' ); grunt.initConfig( { eslint: { - src: [ - '**/*.js', - '!node_modules/**', - '!vendor/**', - '!tests/externals/**', - '!docs/**' + options: { + cache: true, + fix: grunt.option( 'fix' ) + }, + all: [ + '**/*.{js,json}', + '!{tests/externals,docs}/**', + '!{vendor,node_modules}/**' ] }, // Lint – Styling @@ -25,15 +26,14 @@ module.exports = function ( grunt ) { syntax: 'less' }, all: [ - 'modules/**/*.css', - 'modules/**/*.less' + 'modules/**/*.{css,less}' ] }, // SVG Optimization svgmin: { options: { js2svg: { - indent: ' ', + indent: '\t', pretty: true }, multipass: true, @@ -65,7 +65,10 @@ module.exports = function ( grunt ) { } ] } }, - banana: conf.MessagesDirs, + // eslint-disable-next-line es/no-object-assign + banana: Object.assign( { + options: { requireLowerCase: false } + }, conf.MessagesDirs ), watch: { files: [ '.{stylelintrc,eslintrc}.json', @@ -73,19 +76,11 @@ module.exports = function ( grunt ) { '<%= stylelint.all %>' ], tasks: 'test' - }, - jsonlint: { - all: [ - '**/*.json', - '!node_modules/**', - '!vendor/**', - '!docs/**' - ] } } ); grunt.registerTask( 'minify', 'svgmin' ); - grunt.registerTask( 'lint', [ 'eslint', 'stylelint', 'jsonlint', 'banana' ] ); + grunt.registerTask( 'lint', [ 'eslint', 'stylelint', 'banana' ] ); grunt.registerTask( 'test', 'lint' ); grunt.registerTask( 'default', [ 'minify', 'test' ] ); }; |