From bb0eb49aaa77aea3af73831fe5e0cb709f57e721 Mon Sep 17 00:00:00 2001 From: alistair3149 Date: Mon, 5 Dec 2022 15:08:18 -0500 Subject: [PATCH] =?UTF-8?q?chore(ci):=20=F0=9F=94=A7=20=F0=9F=91=B7=20make?= =?UTF-8?q?=20es-x=20eslint=20rules=20warn=20instead=20of=20error?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit They will be addressed when we are rewriting the modules to ES6 --- .eslintrc.json | 27 +++++++++++-------- .../gateway/mwActionApi.js | 1 - 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 29364c8f..5ed08e6f 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -4,22 +4,27 @@ "wikimedia/client-es6", "wikimedia/mediawiki" ], + "env": { + "browser": true + }, "globals": { - "require": "readonly", - "module": "readonly" + "exports": true }, "rules": { - "one-var": "off", - "//": [ - "off", - "ResourceLoader's `packageFiles` do not require wrapping but the `module` option is only available in ES6+." - ], - "no-implicit-globals": "off", - "es/no-object-fromentries": "off", - "es/no-object-entries": "off", + "no-implicit-globals": "warn", + "es-x/no-async-functions": "warn", + "es-x/no-object-fromentries": "warn", + "es-x/no-object-entries": "warn", + "es-x/no-object-values": "warn", + "es-x/no-array-prototype-includes": "warn", + "es-x/no-optional-chaining": "warn", + "es-x/no-nullish-coalescing-operators": "warn", + "es-x/no-symbol-prototype-description": "warn", + "compat/compat": "warn", "mediawiki/class-doc": "off" }, "parserOptions": { - "ecmaVersion": 11 + "ecmaVersion": 11, + "sourceType": "module" } } diff --git a/resources/skins.citizen.search/gateway/mwActionApi.js b/resources/skins.citizen.search/gateway/mwActionApi.js index cba62551..fa7236dc 100644 --- a/resources/skins.citizen.search/gateway/mwActionApi.js +++ b/resources/skins.citizen.search/gateway/mwActionApi.js @@ -84,7 +84,6 @@ function convertDataToResults( data ) { return []; } - /* eslint-disable-next-line compat/compat, es/no-object-values */ data = Object.values( data.query.pages ); // Sort the data with the index property since it is not in order