DEV: Update linting setup and fix issues (#17345)

Re-lands #16119 and #17298

* Update eslint-config-discourse
* Update linting workflow
* Prettier-ignore stuff
* Update template-lint config
* Auto-fix template issues
* Fix various template issues
  Mostly incorrect attributes and unused templates
* Prettier js files
* Fix template auto-fix regressions
* Small css tweak

Co-authored-by: Peter Wagenet <peter.wagenet@gmail.com>
This commit is contained in:
Jarek Radosz
2022-07-06 10:37:54 +02:00
committed by GitHub
parent f7c133ac74
commit c3fd91670e
186 changed files with 3235 additions and 3127 deletions

View File

@ -48,13 +48,13 @@
</div>
<div class="picker-panel">
<Input @class="fake-input" />
<Input class="fake-input" />
<div class="date-picker" id="picker-container-{{this.elementId}}"></div>
{{#if this.fromSelected}}
<div class="time-pickers">
{{d-icon "far-clock"}}
<Input @maxlength={{5}} @placeholder="hh:mm" @input={{action "setTime"}} @type="time" @value={{this.time}} @class="time-picker" />
<Input maxlength={{5}} placeholder="hh:mm" @type="time" @value={{this.time}} class="time-picker" {{on "input" (action "setTime")}} />
</div>
{{/if}}
@ -62,7 +62,7 @@
{{#if this.toDate}}
<div class="time-pickers">
{{d-icon "far-clock"}}
<Input @maxlength={{5}} @placeholder="hh:mm" @input={{action "setToTime"}} @type="time" @value={{this.toTime}} @class="time-picker" />
<Input maxlength={{5}} placeholder="hh:mm" @type="time" @value={{this.toTime}} class="time-picker" {{on "input" (action "setToTime")}} />
</div>
{{/if}}
{{/if}}

View File

@ -190,9 +190,8 @@ function initializeDiscourseLocalDates(api) {
return "";
}
if (this.element.attributes["data-range"] === "true") {
this.metadata.discourseLocalDateStartRangeOpts = buildOptionsFromMarkdownTag(
this.element
);
this.metadata.discourseLocalDateStartRangeOpts =
buildOptionsFromMarkdownTag(this.element);
return "";
}
const opts = buildOptionsFromMarkdownTag(this.element, siteSettings);

View File

@ -202,9 +202,8 @@ export function setup(helper) {
helper.registerOptions((opts, siteSettings) => {
opts.datesEmailFormat = siteSettings.discourse_local_dates_email_format;
opts.features[
"discourse-local-dates"
] = !!siteSettings.discourse_local_dates_enabled;
opts.features["discourse-local-dates"] =
!!siteSettings.discourse_local_dates_enabled;
});
helper.registerPlugin((md) => {