From 2479c7f1bb132bab828ec2e5e591057f0e66d2e2 Mon Sep 17 00:00:00 2001 From: Ed Sanders Date: Mon, 7 Feb 2022 16:22:02 +0000 Subject: [PATCH] eslint: Lint Gruntile.js using server rules Change-Id: I9e452fc08ae483431ad83dca3c7ebd7f04f5d945 --- .eslintrc.json | 10 ++-------- Gruntfile.js | 4 ++-- modules/.eslintrc.json | 11 +++++++++++ package-lock.json | 12 ++++++------ 4 files changed, 21 insertions(+), 16 deletions(-) create mode 100644 modules/.eslintrc.json diff --git a/.eslintrc.json b/.eslintrc.json index e091f381..04f9da7a 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,12 +1,6 @@ { "root": true, "extends": [ - "wikimedia/client-es5", - "wikimedia/jquery", - "wikimedia/mediawiki" - ], - "rules": { - "max-len": "off", - "no-shadow": "warn" - } + "wikimedia/server" + ] } diff --git a/Gruntfile.js b/Gruntfile.js index d80b20c5..36f9e0ba 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -4,10 +4,10 @@ * @package CodeEditor */ -/* eslint-env node, es6 */ +'use strict'; 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-contrib-clean' ); grunt.loadNpmTasks( 'grunt-contrib-copy' ); diff --git a/modules/.eslintrc.json b/modules/.eslintrc.json new file mode 100644 index 00000000..877c66e8 --- /dev/null +++ b/modules/.eslintrc.json @@ -0,0 +1,11 @@ +{ + "root": true, + "extends": [ + "wikimedia/client-es5", + "wikimedia/jquery", + "wikimedia/mediawiki" + ], + "rules": { + "max-len": "off" + } +} diff --git a/package-lock.json b/package-lock.json index 6d6fd9ca..1bb16193 100644 --- a/package-lock.json +++ b/package-lock.json @@ -868,9 +868,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001307", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001307.tgz", - "integrity": "sha512-+MXEMczJ4FuxJAUp0jvAl6Df0NI/OfW1RWEE61eSmzS7hw6lz4IKutbhbXendwq8BljfFuHtu26VWsg4afQ7Ng==", + "version": "1.0.30001309", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001309.tgz", + "integrity": "sha512-Pl8vfigmBXXq+/yUz1jUwULeq9xhMJznzdc/xwl4WclDAuebcTHVefpz8lE/bMI+UN7TOkSSe7B7RnZd6+dzjA==", "dev": true, "funding": { "type": "opencollective", @@ -6912,9 +6912,9 @@ } }, "caniuse-lite": { - "version": "1.0.30001307", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001307.tgz", - "integrity": "sha512-+MXEMczJ4FuxJAUp0jvAl6Df0NI/OfW1RWEE61eSmzS7hw6lz4IKutbhbXendwq8BljfFuHtu26VWsg4afQ7Ng==", + "version": "1.0.30001309", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001309.tgz", + "integrity": "sha512-Pl8vfigmBXXq+/yUz1jUwULeq9xhMJznzdc/xwl4WclDAuebcTHVefpz8lE/bMI+UN7TOkSSe7B7RnZd6+dzjA==", "dev": true }, "chalk": {