From 00fc2c3f1e9aed276fdd47cf3bcdb7dcd5479d0c Mon Sep 17 00:00:00 2001 From: libraryupgrader Date: Wed, 4 Nov 2020 09:55:45 +0000 Subject: [PATCH] build: Updating mediawiki/mediawiki-codesniffer to 33.0.0 The following sniffs are failing and were disabled: * MediaWiki.Commenting.FunctionComment.ObjectTypeHintParam * MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationPrivate * MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationProtected * MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationPublic * MediaWiki.Commenting.PropertyDocumentation.WrongStyle Additional changes: * Added the `wikimedia/mediawiki` profile in .eslintrc.json (T262222). * Added the `wikimedia/jquery` profile in .eslintrc.json (T262222). * Removed global `$`, included in the `wikimedia/jquery` profile (T262222). * Removed global `mw`, included via `wikimedia/mediawiki` profile (T262222). * Dropped the emtpy global definition in .eslintrc.json. Change-Id: Ib0acbf92bcb8327ecd065db5db1083d7b222976c --- .eslintrc.json | 15 +++++++++++---- .phpcs.xml | 5 +++++ composer.json | 2 +- includes/engines/LuaCommon/UstringLibrary.php | 6 +++--- 4 files changed, 20 insertions(+), 8 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 1a49e0ab..0767ac67 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,11 +1,18 @@ { "root": true, - "extends": "wikimedia", + "extends": [ + "wikimedia", + "wikimedia/mediawiki", + "wikimedia/jquery" + ], "env": { "browser": true }, - "globals": { - "mw": false, - "$": false + "rules": { + "no-jquery/no-global-selector": "warn", + "no-jquery/no-parse-html-literal": "warn", + "no-jquery/no-global-selector": "warn", + "mediawiki/class-doc": "warn", + "mediawiki/msg-doc": "warn" } } diff --git a/.phpcs.xml b/.phpcs.xml index c913d8f4..8ff5f8d9 100644 --- a/.phpcs.xml +++ b/.phpcs.xml @@ -1,6 +1,11 @@ + + + + + diff --git a/composer.json b/composer.json index 68564459..287031ab 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "require-dev": { "mediawiki/lua-sandbox": "3.0.1", - "mediawiki/mediawiki-codesniffer": "31.0.0", + "mediawiki/mediawiki-codesniffer": "33.0.0", "mediawiki/mediawiki-phan-config": "0.10.3", "mediawiki/minus-x": "1.1.0", "php-parallel-lint/php-console-highlighter": "0.5.0", diff --git a/includes/engines/LuaCommon/UstringLibrary.php b/includes/engines/LuaCommon/UstringLibrary.php index 11675c5b..4f203bfe 100644 --- a/includes/engines/LuaCommon/UstringLibrary.php +++ b/includes/engines/LuaCommon/UstringLibrary.php @@ -5,21 +5,21 @@ use UtfNormal\Validator; class Scribunto_LuaUstringLibrary extends Scribunto_LuaLibraryBase { /** * Limit on pattern lengths, in bytes not characters - * @var integer + * @var int */ private $patternLengthLimit = 10000; /** * Limit on string lengths, in bytes not characters * If null, $wgMaxArticleSize * 1024 will be used - * @var integer|null + * @var int|null */ private $stringLengthLimit = null; /** * PHP until 5.6.9 are buggy when the regex in preg_replace an * preg_match_all matches the empty string. - * @var boolean + * @var bool */ private $phpBug53823 = false;