DEV: Fix no-negated-condition linting issues (#22808)

This commit is contained in:
Jarek Radosz 2023-07-26 19:53:37 +02:00 committed by GitHub
parent f3b7351ff6
commit 92d2ea008e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 14 additions and 17 deletions

View File

@ -22,7 +22,6 @@ module.exports = {
"no-implicit-this": {
allow: ["loading-spinner"],
},
"no-negated-condition": false,
"no-obscure-array-access": false,
"require-mandatory-role-attributes": false,
"require-media-caption": false,

View File

@ -53,15 +53,7 @@
@disabled={{@loading}}
/>
{{#if (not @model.previous_hidden)}}
<DButton
@action={{@hideVersion}}
@icon="far-eye-slash"
@label="post.revisions.controls.hide"
class="btn-danger hide-revision"
@disabled={{@loading}}
/>
{{else}}
{{#if @model.previous_hidden}}
<DButton
@action={{@showVersion}}
@icon="far-eye"
@ -69,6 +61,14 @@
class="btn-default show-revision"
@disabled={{@loading}}
/>
{{else}}
<DButton
@action={{@hideVersion}}
@icon="far-eye-slash"
@label="post.revisions.controls.hide"
class="btn-danger hide-revision"
@disabled={{@loading}}
/>
{{/if}}
{{#if (and @canPermanentlyDelete @model.previous_hidden)}}

View File

@ -76,7 +76,7 @@
<span>{{i18n "user.preferences_nav.interface"}}</span>
</DNavigationItem>
{{#if (not (eq this.siteSettings.navigation_menu "legacy"))}}
{{#if (not-eq this.siteSettings.navigation_menu "legacy")}}
<DNavigationItem
@route="preferences.navigation-menu"
@ariaCurrentContext="subNav"

View File

@ -40,9 +40,7 @@
{{#each this.fitzpatrickModifiers as |fitzpatrick|}}
{{#if
(not
(eq fitzpatrick.scale this.chatEmojiReactionStore.diversity)
)
(not-eq fitzpatrick.scale this.chatEmojiReactionStore.diversity)
}}
<button
type="button"
@ -82,7 +80,7 @@
</div>
{{#if this.chatEmojiPickerManager.sections.length}}
{{#if (not (gte this.filteredEmojis.length 0))}}
{{#if (eq this.filteredEmojis null)}}
<div class="chat-emoji-picker__sections-nav">
<div
class="chat-emoji-picker__sections-nav__indicator"
@ -129,7 +127,7 @@
{{on "keydown" this.onSectionsKeyDown}}
role="button"
>
{{#if (gte this.filteredEmojis.length 0)}}
{{#if (not-eq this.filteredEmojis null)}}
<div class="chat-emoji-picker__section filtered">
{{#each this.filteredEmojis as |emoji|}}
<img
@ -162,7 +160,7 @@
<div
class={{concat-class
"chat-emoji-picker__section"
(if (gte this.filteredEmojis.length 0) "hidden")
(if (not-eq this.filteredEmojis null) "hidden")
}}
data-section={{section}}
role="region"