diff --git a/.template-lintrc.js b/.template-lintrc.js index 77a11b8f2cb..18ffe7b89b2 100644 --- a/.template-lintrc.js +++ b/.template-lintrc.js @@ -5,6 +5,7 @@ module.exports = { rules: { "no-action-modifiers": true, "no-args-paths": true, + "no-array-prototype-extensions": false, "no-attrs-in-components": true, "no-capital-arguments": false, // TODO: we extensively use `args` argument name "no-curly-component-invocation": { @@ -21,6 +22,10 @@ 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, // Begin prettier compatibility "eol-last": false, "self-closing-void-elements": false, diff --git a/app/assets/javascripts/discourse/app/components/d-button.hbs b/app/assets/javascripts/discourse/app/components/d-button.hbs index 4719a12dacd..0b9fc386241 100644 --- a/app/assets/javascripts/discourse/app/components/d-button.hbs +++ b/app/assets/javascripts/discourse/app/components/d-button.hbs @@ -1,4 +1,4 @@ -{{! template-lint-disable no-down-event-binding }} +{{! template-lint-disable no-pointer-down-event-binding }} - {{! template-lint-enable no-unnecessary-concat }} + {{! template-lint-enable no-redundant-role }} {{#if @state}} diff --git a/app/assets/javascripts/discourse/app/components/d-toggle-switch.js b/app/assets/javascripts/discourse/app/components/d-toggle-switch.js index 5dcd2cebb30..0bd175dd11d 100644 --- a/app/assets/javascripts/discourse/app/components/d-toggle-switch.js +++ b/app/assets/javascripts/discourse/app/components/d-toggle-switch.js @@ -1,15 +1,15 @@ import Component from "@glimmer/component"; -import { tracked } from "@glimmer/tracking"; import I18n from "I18n"; -export default class DiscourseToggleSwitch extends Component { - @tracked iconEnabled = true; - @tracked showIcon = this.iconEnabled && this.icon; - +export default class DToggleSwitch extends Component { get computedLabel() { if (this.args.label) { return I18n.t(this.args.label); } return this.args.translatedLabel; } + + get checked() { + return this.args.state ? "true" : "false"; + } } diff --git a/app/assets/javascripts/discourse/app/components/emoji-picker.hbs b/app/assets/javascripts/discourse/app/components/emoji-picker.hbs index c2dc26b2f27..12cd404d667 100644 --- a/app/assets/javascripts/discourse/app/components/emoji-picker.hbs +++ b/app/assets/javascripts/discourse/app/components/emoji-picker.hbs @@ -1,10 +1,10 @@ {{#if this.isActive}} - {{! template-lint-disable no-invalid-interactive no-down-event-binding }} + {{! template-lint-disable no-invalid-interactive no-pointer-down-event-binding }}
- {{! template-lint-enable no-invalid-interactive no-down-event-binding }} + {{! template-lint-enable no-invalid-interactive no-pointer-down-event-binding }}
{{#if this.recentEmojis.length}}
diff --git a/app/assets/javascripts/discourse/app/components/horizontal-overflow-nav.hbs b/app/assets/javascripts/discourse/app/components/horizontal-overflow-nav.hbs index eb9e159df6c..43302b0d661 100644 --- a/app/assets/javascripts/discourse/app/components/horizontal-overflow-nav.hbs +++ b/app/assets/javascripts/discourse/app/components/horizontal-overflow-nav.hbs @@ -1,4 +1,4 @@ -{{! template-lint-disable no-down-event-binding }} +{{! template-lint-disable no-pointer-down-event-binding }} {{! template-lint-disable no-invalid-interactive }}