From c1493e185a6c94e8738b04a6e655994d9478d8e4 Mon Sep 17 00:00:00 2001 From: NovemLinguae Date: Mon, 25 Nov 2024 06:33:16 -0800 Subject: [PATCH] eslint: apply autofixes 3 - apply all remaining autofixes with `npx eslint --fix .` - turn off jsdoc/require-param because I didn't like the autofix. would just add params without any types or descriptions - turn off jsdoc/require-returns for now. lots of docblocks that are just being used as comments, which is fine --- .eslintrc.json | 8 +- modules/twinklearv.js | 34 ++--- modules/twinklebatchdelete.js | 4 +- modules/twinklebatchprotect.js | 2 +- modules/twinkleblock.js | 4 +- modules/twinkleimage.js | 2 +- modules/twinklerollback.js | 10 +- modules/twinkleshared.js | 4 +- modules/twinklespeedy.js | 14 +- modules/twinkletag.js | 4 +- modules/twinkletalkback.js | 2 +- modules/twinkleunlink.js | 4 +- modules/twinklewarn.js | 67 ++++----- modules/twinklewelcome.js | 6 +- modules/twinklexfd.js | 19 ++- morebits.js | 261 +++++++++++++++++---------------- twinkle.js | 15 +- 17 files changed, 235 insertions(+), 225 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index f15d5e170..bcdefaa4a 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -14,6 +14,9 @@ "array-bracket-spacing": "off", "camelcase": "off", "computed-property-spacing": "off", + "indent": "off", + "jsdoc/require-param": "off", + "jsdoc/require-returns": "off", "max-len": "off", "no-alert": "off", "no-jquery/no-class-state": "off", @@ -41,13 +44,10 @@ "es-x/no-array-prototype-includes": "warn", "es-x/no-object-values": "warn", - "indent": "off", - "jsdoc/require-asterisk-prefix": "warn", "mediawiki/class-doc": "warn", "new-cap": "warn", "no-jquery/no-constructor-attributes": "warn", "no-jquery/no-each-util": "warn", - "no-jquery/no-extend": "warn", "no-jquery/no-grep": "warn", "no-jquery/no-in-array": "warn", "no-jquery/no-map-util": "warn", @@ -60,12 +60,10 @@ "no-script-url": "warn", "no-sequences": "warn", "no-throw-literal": "warn", - "no-unneeded-ternary": "warn", "no-unused-expressions": "warn", "no-use-before-define": "warn", "no-useless-concat": "warn", "no-var": "warn", - "operator-linebreak": "warn", "prefer-const": "warn" } } diff --git a/modules/twinklearv.js b/modules/twinklearv.js index 2b4c1afea..c4905707e 100644 --- a/modules/twinklearv.js +++ b/modules/twinklearv.js @@ -373,10 +373,10 @@ Twinkle.arv.callback.changeCategory = function (e) { } else { for (let i = 0; i < page.revisions.length; ++i) { const rev = page.revisions[i]; - const $entry = $('
', { + const $entry = $('
', { class: 'entry' }); - const $input = $('', { + const $input = $('', { type: 'checkbox', name: 's_' + field, value: rev.revid @@ -397,15 +397,15 @@ Twinkle.arv.callback.changeCategory = function (e) { // add free form input for resolves if (field === 'resolves') { - const $free_entry = $('
', { + const $free_entry = $('
', { class: 'entry' }); - const $free_input = $('', { + const $free_input = $('', { type: 'text', name: 's_resolves_free' }); - const $free_label = $('