build: Replace jsonlint with eslint

Bug: T220036
Change-Id: I1651fbf89286442b392e6fe90899756705667f04
This commit is contained in:
Umherirrender 2021-02-15 20:27:55 +01:00
parent 8db9394a9c
commit 3c124d97bb
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

@ -4,3 +4,4 @@
node_modules/**
vendor/**
composer.lock
/.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"
}
}