[ticket/16405] Update code for eslint and stylelint updates

PHPBB3-16405
This commit is contained in:
Marc Alexander 2022-04-16 17:06:12 +02:00
parent 68cb599354
commit 620ee4d85b
No known key found for this signature in database
GPG key ID: 50E0D2423696F995
5 changed files with 14 additions and 16 deletions

View file

@ -61,10 +61,10 @@
"declaration-empty-line-before": "never", "declaration-empty-line-before": "never",
"declaration-property-unit-blacklist": { "declaration-property-unit-disallowed-list": {
"line-height": ["rem", "em", "%"] "line-height": ["rem", "em", "%"]
}, },
"declaration-property-unit-whitelist": { "declaration-property-unit-allowed-list": {
"height": ["px", "%", "vh"], "height": ["px", "%", "vh"],
"width": ["px", "%", "vw"], "width": ["px", "%", "vw"],
"font-size": ["px", "rem", "%"], "font-size": ["px", "rem", "%"],

View file

@ -11,8 +11,8 @@
/* stylelint-disable selector-max-id */ /* stylelint-disable selector-max-id */
/* stylelint-disable selector-max-compound-selectors */ /* stylelint-disable selector-max-compound-selectors */
/* stylelint-disable selector-no-qualifying-type */ /* stylelint-disable selector-no-qualifying-type */
/* stylelint-disable declaration-property-unit-blacklist */ /* stylelint-disable declaration-property-unit-disallowed-list */
/* stylelint-disable declaration-property-unit-whitelist */ /* stylelint-disable declaration-property-unit-allowed-list */
/* General markup styles /* General markup styles
---------------------------------------- */ ---------------------------------------- */
@ -3021,8 +3021,8 @@ fieldset.permissions .permissions-switch {
/* stylelint-enable selector-max-id */ /* stylelint-enable selector-max-id */
/* stylelint-enable selector-max-compound-selectors */ /* stylelint-enable selector-max-compound-selectors */
/* stylelint-enable selector-no-qualifying-type */ /* stylelint-enable selector-no-qualifying-type */
/* stylelint-enable declaration-property-unit-blacklist */ /* stylelint-enable declaration-property-unit-disallowed-list */
/* stylelint-enable declaration-property-unit-whitelist */ /* stylelint-enable declaration-property-unit-allowed-list */
.acp-icon-move-up, .acp-icon-move-up,
.acp-icon-move-down { .acp-icon-move-down {

View file

@ -194,9 +194,7 @@
}); });
// Sort names by priorities - higher values come first // Sort names by priorities - higher values come first
_results = _results.sort((a, b) => { _results = _results.sort((a, b) => b.priority - a.priority);
return b.priority - a.priority;
});
// Exact match is the most important - should come above anything else // Exact match is the most important - should come above anything else
$.each(_exactMatch, (name, value) => { $.each(_exactMatch, (name, value) => {
@ -233,9 +231,9 @@
* 2) We have enough names to display OR * 2) We have enough names to display OR
* all relevant names have been fetched from the server * all relevant names have been fetched from the server
*/ */
if (cachedNamesForQuery && if (cachedNamesForQuery
(getMatchedNames(query, cachedNamesForQuery, cachedSearchKey).length >= mentionNamesLimit || && (getMatchedNames(query, cachedNamesForQuery, cachedSearchKey).length >= mentionNamesLimit
cachedAll[cachedKeyword])) { || cachedAll[cachedKeyword])) {
callback(cachedNamesForQuery); callback(cachedNamesForQuery);
return; return;
} }

View file

@ -1227,14 +1227,14 @@ ul.linklist:after,
content: ""; content: "";
} }
/* stylelint-disable declaration-property-unit-whitelist */ /* stylelint-disable declaration-property-unit-allowed-list */
.emoji { .emoji {
width: 1em; width: 1em;
min-width: 18px; min-width: 18px;
height: 1em; height: 1em;
min-height: 18px; min-height: 18px;
} }
/* stylelint-enable declaration-property-unit-whitelist */ /* stylelint-enable declaration-property-unit-allowed-list */
.smilies { .smilies {
vertical-align: text-bottom; vertical-align: text-bottom;

View file

@ -220,13 +220,13 @@ code { display: block; }
display: none; display: none;
} }
/* stylelint-disable declaration-property-unit-whitelist */ /* stylelint-disable declaration-property-unit-allowed-list */
.emoji { .emoji {
width: 1em; width: 1em;
min-width: 18px; min-width: 18px;
height: 1em; height: 1em;
min-height: 18px; min-height: 18px;
} }
/* stylelint-enable declaration-property-unit-whitelist */ /* stylelint-enable declaration-property-unit-allowed-list */
/* stylelint-enable selector-max-compound-selectors */ /* stylelint-enable selector-max-compound-selectors */