build: Replace jscs+jshint with eslint

Change-Id: I7f114267fbb4efd62a9162758445cff4fb3c0973
This commit is contained in:
Ed Sanders
2016-11-02 21:56:31 +00:00
parent 4bd38a0fcf
commit 811944c49a
14 changed files with 69 additions and 100 deletions

View File

@@ -1,19 +1,21 @@
/*jshint node:true */
/* eslint-env node */
module.exports = function ( grunt ) {
'use strict';
grunt.loadNpmTasks( 'grunt-banana-checker' );
grunt.loadNpmTasks( 'grunt-contrib-jshint' );
grunt.loadNpmTasks( 'grunt-jscs' );
grunt.loadNpmTasks( 'grunt-eslint' );
grunt.loadNpmTasks( 'grunt-jsonlint' );
grunt.loadNpmTasks( 'grunt-stylelint' );
grunt.initConfig( {
jshint: {
options: {
jshintrc: true
eslint: {
fix: {
options: {
fix: true
},
src: '<%= eslint.main %>'
},
all: [
main: [
'**/*.js',
'!lib/**',
'!node_modules/**',
@@ -21,9 +23,6 @@ module.exports = function ( grunt ) {
'!resources/js/ext.uls.webfonts.repository.js'
]
},
jscs: {
src: '<%= jshint.all %>'
},
stylelint: {
options: {
syntax: 'less'
@@ -48,6 +47,6 @@ module.exports = function ( grunt ) {
}
} );
grunt.registerTask( 'test', [ 'jshint', 'jscs', 'stylelint', 'jsonlint', 'banana' ] );
grunt.registerTask( 'test', [ 'eslint:main', 'stylelint', 'jsonlint', 'banana' ] );
grunt.registerTask( 'default', 'test' );
};