mirror of
https://github.com/discourse/discourse.git
synced 2025-03-09 14:34:35 +00:00
DEV: Fix no-negated-condition linting issues (#22808)
This commit is contained in:
parent
f3b7351ff6
commit
92d2ea008e
.template-lintrc.js
app/assets/javascripts/discourse/app
plugins/chat/assets/javascripts/discourse/components
@ -22,7 +22,6 @@ module.exports = {
|
|||||||
"no-implicit-this": {
|
"no-implicit-this": {
|
||||||
allow: ["loading-spinner"],
|
allow: ["loading-spinner"],
|
||||||
},
|
},
|
||||||
"no-negated-condition": false,
|
|
||||||
"no-obscure-array-access": false,
|
"no-obscure-array-access": false,
|
||||||
"require-mandatory-role-attributes": false,
|
"require-mandatory-role-attributes": false,
|
||||||
"require-media-caption": false,
|
"require-media-caption": false,
|
||||||
|
@ -53,15 +53,7 @@
|
|||||||
@disabled={{@loading}}
|
@disabled={{@loading}}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{{#if (not @model.previous_hidden)}}
|
{{#if @model.previous_hidden}}
|
||||||
<DButton
|
|
||||||
@action={{@hideVersion}}
|
|
||||||
@icon="far-eye-slash"
|
|
||||||
@label="post.revisions.controls.hide"
|
|
||||||
class="btn-danger hide-revision"
|
|
||||||
@disabled={{@loading}}
|
|
||||||
/>
|
|
||||||
{{else}}
|
|
||||||
<DButton
|
<DButton
|
||||||
@action={{@showVersion}}
|
@action={{@showVersion}}
|
||||||
@icon="far-eye"
|
@icon="far-eye"
|
||||||
@ -69,6 +61,14 @@
|
|||||||
class="btn-default show-revision"
|
class="btn-default show-revision"
|
||||||
@disabled={{@loading}}
|
@disabled={{@loading}}
|
||||||
/>
|
/>
|
||||||
|
{{else}}
|
||||||
|
<DButton
|
||||||
|
@action={{@hideVersion}}
|
||||||
|
@icon="far-eye-slash"
|
||||||
|
@label="post.revisions.controls.hide"
|
||||||
|
class="btn-danger hide-revision"
|
||||||
|
@disabled={{@loading}}
|
||||||
|
/>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{#if (and @canPermanentlyDelete @model.previous_hidden)}}
|
{{#if (and @canPermanentlyDelete @model.previous_hidden)}}
|
||||||
|
@ -76,7 +76,7 @@
|
|||||||
<span>{{i18n "user.preferences_nav.interface"}}</span>
|
<span>{{i18n "user.preferences_nav.interface"}}</span>
|
||||||
</DNavigationItem>
|
</DNavigationItem>
|
||||||
|
|
||||||
{{#if (not (eq this.siteSettings.navigation_menu "legacy"))}}
|
{{#if (not-eq this.siteSettings.navigation_menu "legacy")}}
|
||||||
<DNavigationItem
|
<DNavigationItem
|
||||||
@route="preferences.navigation-menu"
|
@route="preferences.navigation-menu"
|
||||||
@ariaCurrentContext="subNav"
|
@ariaCurrentContext="subNav"
|
||||||
|
@ -40,9 +40,7 @@
|
|||||||
{{#each this.fitzpatrickModifiers as |fitzpatrick|}}
|
{{#each this.fitzpatrickModifiers as |fitzpatrick|}}
|
||||||
|
|
||||||
{{#if
|
{{#if
|
||||||
(not
|
(not-eq fitzpatrick.scale this.chatEmojiReactionStore.diversity)
|
||||||
(eq fitzpatrick.scale this.chatEmojiReactionStore.diversity)
|
|
||||||
)
|
|
||||||
}}
|
}}
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
@ -82,7 +80,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{#if this.chatEmojiPickerManager.sections.length}}
|
{{#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">
|
||||||
<div
|
<div
|
||||||
class="chat-emoji-picker__sections-nav__indicator"
|
class="chat-emoji-picker__sections-nav__indicator"
|
||||||
@ -129,7 +127,7 @@
|
|||||||
{{on "keydown" this.onSectionsKeyDown}}
|
{{on "keydown" this.onSectionsKeyDown}}
|
||||||
role="button"
|
role="button"
|
||||||
>
|
>
|
||||||
{{#if (gte this.filteredEmojis.length 0)}}
|
{{#if (not-eq this.filteredEmojis null)}}
|
||||||
<div class="chat-emoji-picker__section filtered">
|
<div class="chat-emoji-picker__section filtered">
|
||||||
{{#each this.filteredEmojis as |emoji|}}
|
{{#each this.filteredEmojis as |emoji|}}
|
||||||
<img
|
<img
|
||||||
@ -162,7 +160,7 @@
|
|||||||
<div
|
<div
|
||||||
class={{concat-class
|
class={{concat-class
|
||||||
"chat-emoji-picker__section"
|
"chat-emoji-picker__section"
|
||||||
(if (gte this.filteredEmojis.length 0) "hidden")
|
(if (not-eq this.filteredEmojis null) "hidden")
|
||||||
}}
|
}}
|
||||||
data-section={{section}}
|
data-section={{section}}
|
||||||
role="region"
|
role="region"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user