eslint: Lint Gruntile.js using server rules

Change-Id: I6f6f7391668412b2bb572a8d77da8e137fa169bb
This commit is contained in:
Ed Sanders 2022-02-07 16:38:38 +00:00
parent 1172dfa96c
commit b03af20581
5 changed files with 5402 additions and 44 deletions

View file

@ -1,17 +1,6 @@
{ {
"root": true, "root": true,
"extends": [ "extends": [
"wikimedia/client-es5", "wikimedia/server"
"wikimedia/jquery", ]
"wikimedia/mediawiki",
"wikimedia/jsduck"
],
"rules": {
"max-len": "off",
"max-statements-per-line": "off",
"no-jquery/no-class-state": "off",
"no-jquery/no-support": "off",
"no-shadow": "warn",
"compat/compat": "warn"
}
} }

View file

@ -1,7 +1,7 @@
/* eslint-env node */ 'use strict';
module.exports = function ( grunt ) { module.exports = function ( grunt ) {
var conf = grunt.file.readJSON( 'extension.json' ); const conf = grunt.file.readJSON( 'extension.json' );
grunt.loadNpmTasks( 'grunt-banana-checker' ); grunt.loadNpmTasks( 'grunt-banana-checker' );
grunt.loadNpmTasks( 'grunt-eslint' ); grunt.loadNpmTasks( 'grunt-eslint' );

5408
package-lock.json generated

File diff suppressed because it is too large Load diff

17
resources/.eslintrc.json Normal file
View file

@ -0,0 +1,17 @@
{
"root": true,
"extends": [
"wikimedia/client-es5",
"wikimedia/jquery",
"wikimedia/mediawiki",
"wikimedia/jsduck"
],
"rules": {
"max-len": "off",
"max-statements-per-line": "off",
"no-jquery/no-class-state": "off",
"no-jquery/no-support": "off",
"no-shadow": "warn",
"compat/compat": "warn"
}
}

View file

@ -1,5 +1,7 @@
{ {
"root": true,
"extends": [ "extends": [
"../../resources/.eslintrc.json",
"wikimedia/qunit" "wikimedia/qunit"
], ],
"globals": { "globals": {