From 0faac326614b9cb89ba5475e598b185ee5167663 Mon Sep 17 00:00:00 2001 From: Ed Sanders Date: Mon, 7 Feb 2022 16:25:32 +0000 Subject: [PATCH] eslint: Lint Gruntile.js using server rules Change-Id: Ib0e7d62343689bb993476cb1ad40f93fc89a7190 --- .eslintrc.json | 12 ++---------- Gruntfile.js | 3 ++- resources/.eslintrc.json | 14 ++++++++++++++ .../mode/mediawiki/tests/qunit/.eslintrc.json | 3 +-- 4 files changed, 19 insertions(+), 13 deletions(-) create mode 100644 resources/.eslintrc.json diff --git a/.eslintrc.json b/.eslintrc.json index 9e6f5bbd..04f9da7a 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,14 +1,6 @@ { "root": true, "extends": [ - "wikimedia/client-es5", - "wikimedia/jquery", - "wikimedia/mediawiki" - ], - "globals": { - "CodeMirror": "readonly" - }, - "rules": { - "max-len": "off" - } + "wikimedia/server" + ] } diff --git a/Gruntfile.js b/Gruntfile.js index 5d5dd6cf..9d0687fd 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -1,4 +1,5 @@ -/* eslint-env node, es6 */ +'use strict'; + module.exports = function ( grunt ) { grunt.loadNpmTasks( 'grunt-banana-checker' ); grunt.loadNpmTasks( 'grunt-eslint' ); diff --git a/resources/.eslintrc.json b/resources/.eslintrc.json new file mode 100644 index 00000000..9e6f5bbd --- /dev/null +++ b/resources/.eslintrc.json @@ -0,0 +1,14 @@ +{ + "root": true, + "extends": [ + "wikimedia/client-es5", + "wikimedia/jquery", + "wikimedia/mediawiki" + ], + "globals": { + "CodeMirror": "readonly" + }, + "rules": { + "max-len": "off" + } +} diff --git a/resources/mode/mediawiki/tests/qunit/.eslintrc.json b/resources/mode/mediawiki/tests/qunit/.eslintrc.json index 316cfa3e..c29a73ec 100644 --- a/resources/mode/mediawiki/tests/qunit/.eslintrc.json +++ b/resources/mode/mediawiki/tests/qunit/.eslintrc.json @@ -1,7 +1,6 @@ { "extends": [ - "wikimedia/qunit", - "../../../../../.eslintrc.json" + "wikimedia/qunit" ], "rules": { "no-jquery/no-global-selector": "off"