build: Replace jscs, jshint and jsonlint by eslint

Bug: T210365
Change-Id: I184e594a3be8010c9c6561b2b66e5596905a40fe
This commit is contained in:
Umherirrender 2020-02-03 20:49:46 +01:00
parent 30eace5dec
commit 3b8629ad9b
6 changed files with 763 additions and 1734 deletions

View file

@ -1,29 +1,27 @@
/*jshint node:true */
/* eslint-env node, es6 */
module.exports = function ( grunt ) {
'use strict';
grunt.loadNpmTasks( 'grunt-contrib-jshint' );
grunt.loadNpmTasks( 'grunt-banana-checker' );
grunt.loadNpmTasks( 'grunt-jsonlint' );
grunt.loadNpmTasks( 'grunt-eslint' );
grunt.initConfig( {
jshint: {
all: [
'*.js'
]
},
banana: {
all: 'i18n'
},
jsonlint: {
eslint: {
options: {
extensions: [ '.js', '.json' ],
cache: true
},
all: [
'**/*.json',
'**/*.{js,json}',
'!node_modules/**',
'!vendor/**'
]
}
} );
grunt.registerTask( 'test', [ 'jshint', 'jsonlint', 'banana' ] );
grunt.registerTask( 'test', [ 'eslint', 'banana' ] );
grunt.registerTask( 'default', 'test' );
};