build: Replace jsonlint with eslint

Bug: T220036
Change-Id: Icce53006c311bf7201d4b69665b9edca81f173c5
This commit is contained in:
Umherirrender 2021-02-16 08:42:10 +01:00
parent b286497c82
commit 0295fa556a
6 changed files with 1213 additions and 79 deletions

6
.eslintrc.json Normal file
View file

@ -0,0 +1,6 @@
{
"root": true,
"extends": [
"wikimedia/client"
]
}

1
.gitignore vendored
View file

@ -5,3 +5,4 @@
*~
*.kate-swp
.*.swp
/.eslintcache

View file

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

1261
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -4,8 +4,9 @@
"test": "grunt test"
},
"devDependencies": {
"eslint-config-wikimedia": "0.18.1",
"grunt": "1.3.0",
"grunt-banana-checker": "0.9.0",
"grunt-jsonlint": "1.0.7"
"grunt-eslint": "23.0.0"
}
}