From ea9c8c03fe4828809d3249ae3d4e328229cc9720 Mon Sep 17 00:00:00 2001 From: Kevin Ansfield Date: Wed, 4 Jan 2023 09:39:32 +0000 Subject: [PATCH] Update dependency ember-template-lint to v5.3.0 (#16062) refs https://github.com/TryGhost/Ghost/pull/15550 Pulled out of the rolled up node+ember-js+ember-template rollup linter update PR as it required fairly extensive changes. - bumped package - renamed `no-down-event-binding` to `no-pointer-down-event-binding` - disabled `no-pointer-down-event-binding` rule - disabled `no-triple-curlies` rule - ran `yarn lint:hbs --fix` - updated integration tests to match Octane syntax - fixed various one-off errors - updated .lint-todo --- ghost/admin/.lint-todo | 33 ++++ ghost/admin/.template-lintrc.js | 4 +- ghost/admin/app/components/gh-date-picker.hbs | 1 - .../gh-input-with-select/trigger.hbs | 3 +- .../components/gh-koenig-editor-lexical.hbs | 2 +- .../admin/app/components/gh-koenig-editor.hbs | 2 +- .../components/gh-members-segment-select.hbs | 1 - .../components/gh-membership-tiers-alpha.hbs | 2 +- ghost/admin/app/components/gh-url-preview.js | 2 +- .../member/subscription-detail-box.hbs | 2 +- .../app/components/modal-member-tier.hbs | 1 - .../modals/confirm-unsaved-changes.hbs | 2 +- .../modals/design/confirm-delete-theme.hbs | 2 +- .../components/modals/design/theme-errors.hbs | 8 +- .../modals/newsletters/confirm-archive.hbs | 2 +- .../newsletters/confirm-newsletter-email.hbs | 2 +- .../modals/newsletters/confirm-unarchive.hbs | 2 +- .../newsletters/verify-newsletter-email.hbs | 2 +- .../modals/settings/confirm-email.hbs | 2 +- .../modals/settings/verify-email.hbs | 2 +- ...wer-select-vertical-collection-options.hbs | 2 +- .../app/components/settings/history/table.hbs | 2 +- .../integrations/webhook-form-modal.hbs | 1 - .../admin/app/templates/application-error.hbs | 2 +- ghost/admin/app/templates/offers.hbs | 146 +++++++++--------- .../templates/settings/integrations/slack.hbs | 8 +- .../addon/components/koenig-card-audio.hbs | 4 +- .../addon/components/koenig-card-file.hbs | 3 +- .../addon/components/koenig-card-image.hbs | 2 +- .../addon/components/koenig-card-product.hbs | 2 +- .../addon/components/koenig-card-video.hbs | 2 +- ghost/admin/package.json | 2 +- .../integration/components/gh-alerts-test.js | 4 +- .../components/gh-cm-editor-test.js | 10 +- .../components/gh-file-uploader-test.js | 68 ++++---- .../components/gh-image-uploader-test.js | 58 +++---- .../gh-image-uploader-with-preview-test.js | 6 +- .../components/gh-notifications-test.js | 2 +- .../components/gh-psm-tags-input-test.js | 16 +- .../components/gh-psm-template-select-test.js | 4 +- .../gh-psm-visibility-input-test.js | 4 +- .../components/gh-search-input-test.js | 4 +- .../components/gh-timezone-select-test.js | 23 +-- .../components/gh-trim-focus-input-test.js | 35 +++-- .../components/gh-unsplash-photo-test.js | 8 +- .../components/gh-unsplash-test.js | 2 +- .../components/gh-uploader-test.js | 63 ++++---- .../components/modal-import-members-test.js | 20 +-- .../components/tags/tag-form-test.js | 26 ++-- .../helpers/activity-feed-fetcher-test.js | 10 +- .../helpers/gh-url-preview-test.js | 20 +-- yarn.lock | 54 ++++--- 52 files changed, 379 insertions(+), 311 deletions(-) diff --git a/ghost/admin/.lint-todo b/ghost/admin/.lint-todo index a2cf637ce0..225ad083be 100644 --- a/ghost/admin/.lint-todo +++ b/ghost/admin/.lint-todo @@ -1103,3 +1103,36 @@ add|ember-template-lint|no-passed-in-event-handlers|23|16|23|16|d47dcf0c8eea7584 add|ember-template-lint|no-passed-in-event-handlers|24|16|24|16|14a806b3f993ec777b1a5ff7e00887e5840bbb77|1670976000000|1681340400000|1686524400000|app/components/gh-benefit-item.hbs remove|ember-template-lint|no-passed-in-event-handlers|150|56|150|56|37bf29e93ffc35c71cdddd0ab98edeb60097e826|1662681600000|1673053200000|1678237200000|app/templates/offer.hbs remove|ember-template-lint|no-passed-in-event-handlers|161|56|161|56|37bf29e93ffc35c71cdddd0ab98edeb60097e826|1662681600000|1673053200000|1678237200000|app/templates/offer.hbs +remove|ember-template-lint|simple-unless|19|34|19|34|ca177565b6e1c5a6175982047708732f5dde7e59|1662681600000|1673053200000|1678237200000|app/components/gh-member-details-activity.hbs +remove|ember-template-lint|simple-unless|18|30|18|30|ca177565b6e1c5a6175982047708732f5dde7e59|1662681600000|1673053200000|1678237200000|app/components/gh-member-details.hbs +remove|ember-template-lint|simple-unless|64|30|64|30|ca177565b6e1c5a6175982047708732f5dde7e59|1662681600000|1673053200000|1678237200000|app/components/gh-post-settings-menu.hbs +remove|ember-template-lint|simple-unless|190|62|190|62|5d9203e10703908836b537481cf012f167ded239|1662681600000|1673053200000|1678237200000|app/components/gh-post-settings-menu.hbs +remove|ember-template-lint|simple-unless|84|30|84|30|5d9203e10703908836b537481cf012f167ded239|1662681600000|1673053200000|1678237200000|app/components/modal-import-members.hbs +remove|ember-template-lint|simple-unless|86|30|86|30|17d2867a6155411eaf3c32cb83391e3118c2afc8|1667520000000|1677888000000|1683072000000|app/components/posts/links-table.hbs +remove|ember-template-lint|simple-unless|98|26|98|26|17d2867a6155411eaf3c32cb83391e3118c2afc8|1667520000000|1677888000000|1683072000000|app/components/posts/links-table.hbs +remove|ember-template-lint|simple-unless|37|41|37|41|ca177565b6e1c5a6175982047708732f5dde7e59|1662681600000|1673053200000|1678237200000|lib/koenig-editor/addon/components/koenig-card-image.hbs +remove|ember-template-lint|simple-unless|36|37|36|37|ca177565b6e1c5a6175982047708732f5dde7e59|1662681600000|1673053200000|1678237200000|lib/koenig-editor/addon/components/koenig-card-video.hbs +remove|ember-template-lint|simple-unless|41|26|41|26|ca177565b6e1c5a6175982047708732f5dde7e59|1662681600000|1673053200000|1678237200000|lib/koenig-editor/addon/components/koenig-card-video.hbs +remove|ember-template-lint|simple-unless|4|79|4|79|5d9203e10703908836b537481cf012f167ded239|1662681600000|1673053200000|1678237200000|lib/koenig-editor/addon/components/koenig-menu-content.hbs +remove|ember-template-lint|no-duplicate-attributes|9|4|9|4|1bd74ed221db1070a4ef257ccb712285f6e4ebc6|1663977600000|1674349200000|1679533200000|app/components/gh-members-segment-select.hbs +remove|ember-template-lint|table-groups|29|12|29|12|22a05b8f3ce6682814afd256f64d33aa86cd5063|1667433600000|1677801600000|1682985600000|app/templates/offers.hbs +remove|ember-template-lint|require-input-label|4|0|4|0|ce9c488b3c6a110afe45e2242fb068fd4ed61f22|1662681600000|1673053200000|1678237200000|app/components/gh-input-with-select/trigger.hbs +remove|ember-template-lint|simple-unless|7|16|7|16|02b279bc993a1ee6632c7e6edf341a2aabc519cb|1662681600000|1673053200000|1678237200000|app/components/modals/design/theme-errors.hbs +remove|ember-template-lint|simple-unless|54|44|54|44|02b279bc993a1ee6632c7e6edf341a2aabc519cb|1662681600000|1673053200000|1678237200000|app/templates/settings/integrations/slack.hbs +remove|ember-template-lint|no-unused-block-params|1|0|1|0|156821bab3e9e1e1fe662b997173fa21ba6ec8ff|1662681600000|1673053200000|1678237200000|lib/koenig-editor/addon/components/koenig-card-file.hbs +remove|ember-template-lint|no-autofocus-attribute|14|4|14|4|bc0a12a01d16038dd3224726d5c4fe81b2d458b6|1662681600000|1673053200000|1678237200000|app/components/gh-input-with-select/trigger.hbs +remove|ember-template-lint|no-triple-curlies|1|0|1|0|26e1d2a3fcc165e3eb94cec903dc0fbff0e26e0e|1662681600000|1673053200000|1678237200000|app/components/gh-blog-url.hbs +remove|ember-template-lint|no-triple-curlies|3|0|3|0|7ceb921960f42e312847d43c601bc98f2eced9f4|1662681600000|1673053200000|1678237200000|app/components/gh-feature-flag.hbs +remove|ember-template-lint|no-triple-curlies|5|12|5|12|5ccce366ce8389f55dc57b1d684c310e65eb26a6|1662681600000|1673053200000|1678237200000|app/components/gh-theme-error-li.hbs +remove|ember-template-lint|no-triple-curlies|19|8|19|8|87b1676e19127a8136984abf3f6b3947569afc25|1662681600000|1673053200000|1678237200000|app/components/gh-theme-error-li.hbs +remove|ember-template-lint|no-triple-curlies|29|28|29|28|9f944c7207ff6f368ea28436c94ff67977fb6823|1662681600000|1673053200000|1678237200000|app/templates/whatsnew.hbs +remove|ember-template-lint|no-triple-curlies|146|20|146|20|9a305980cd2c3469773e4adafa4e02a949dbc919|1662681600000|1673053200000|1678237200000|app/components/gh-nav-menu/main.hbs +remove|ember-template-lint|no-triple-curlies|81|20|81|20|5fc0b56a3c059cf57b60432ba413d490074e3315|1662681600000|1673053200000|1678237200000|lib/koenig-editor/addon/components/koenig-card-callout.hbs +remove|ember-template-lint|no-triple-curlies|167|23|167|23|9109f8baf6d3a4cce8e0ceb13f5bca99bdbe4004|1662681600000|1673053200000|1678237200000|lib/koenig-editor/addon/components/koenig-card-email-cta.hbs +remove|ember-template-lint|no-triple-curlies|38|11|38|11|9109f8baf6d3a4cce8e0ceb13f5bca99bdbe4004|1662681600000|1673053200000|1678237200000|lib/koenig-editor/addon/components/koenig-card-email.hbs +remove|ember-template-lint|no-triple-curlies|172|46|172|46|f85a33dff9dc1a580ba55ca8e6f73bf1cd671f69|1662681600000|1673053200000|1678237200000|lib/koenig-editor/addon/components/koenig-card-header.hbs +remove|ember-template-lint|no-triple-curlies|174|53|174|53|8aa6418d946a4a6de4a9f7e963860014b0dd68ee|1662681600000|1673053200000|1678237200000|lib/koenig-editor/addon/components/koenig-card-header.hbs +remove|ember-template-lint|no-triple-curlies|25|47|25|47|8336bb2ae349079452ea98bf142c3e7dd649c549|1662681600000|1673053200000|1678237200000|lib/koenig-editor/addon/components/koenig-card-html.hbs +remove|ember-template-lint|no-triple-curlies|63|24|63|24|b4fdf1937520db3f14f6f93ec84f03b7653414c0|1662681600000|1673053200000|1678237200000|lib/koenig-editor/addon/components/koenig-card-toggle.hbs +remove|ember-template-lint|no-triple-curlies|72|16|72|16|9197e9050977ef47965e1b6e8d99bee542a7c559|1662681600000|1673053200000|1678237200000|lib/koenig-editor/addon/components/koenig-card-toggle.hbs +remove|ember-template-lint|no-invalid-interactive|93|36|93|36|fc4eb64cc0ad0cc9c500c7ef026e44649bc4778b|1662681600000|1673053200000|1678237200000|app/templates/offers.hbs diff --git a/ghost/admin/.template-lintrc.js b/ghost/admin/.template-lintrc.js index ebb04ffb7f..6fdd9bc177 100644 --- a/ghost/admin/.template-lintrc.js +++ b/ghost/admin/.template-lintrc.js @@ -5,6 +5,8 @@ module.exports = { 'no-forbidden-elements': ['meta', 'html', 'script'], 'no-implicit-this': {allow: ['noop', 'now', 'site-icon-style', 'accent-color-background']}, 'no-inline-styles': false, - 'no-duplicate-landmark-elements': false + 'no-duplicate-landmark-elements': false, + 'no-pointer-down-event-binding': false, + 'no-triple-curlies': false } }; diff --git a/ghost/admin/app/components/gh-date-picker.hbs b/ghost/admin/app/components/gh-date-picker.hbs index 63d60a943d..62d37dce01 100644 --- a/ghost/admin/app/components/gh-date-picker.hbs +++ b/ghost/admin/app/components/gh-date-picker.hbs @@ -10,7 +10,6 @@ >
- {{!-- template-lint-disable no-down-event-binding --}} \ No newline at end of file diff --git a/ghost/admin/app/components/gh-koenig-editor-lexical.hbs b/ghost/admin/app/components/gh-koenig-editor-lexical.hbs index 5404726893..62beecfad7 100644 --- a/ghost/admin/app/components/gh-koenig-editor-lexical.hbs +++ b/ghost/admin/app/components/gh-koenig-editor-lexical.hbs @@ -1,6 +1,6 @@
{{!-- full height content pane --}} - {{!-- template-lint-disable no-down-event-binding no-invalid-interactive no-passed-in-event-handlers --}} + {{!-- template-lint-disable no-invalid-interactive no-passed-in-event-handlers --}}
{{!-- full height content pane --}} - {{!-- template-lint-disable no-down-event-binding no-invalid-interactive no-passed-in-event-handlers --}} + {{!-- template-lint-disable no-invalid-interactive no-passed-in-event-handlers --}}
-
+
*/ @classic @classNames('ghost-url-preview') diff --git a/ghost/admin/app/components/member/subscription-detail-box.hbs b/ghost/admin/app/components/member/subscription-detail-box.hbs index 79139b6747..701479ae05 100644 --- a/ghost/admin/app/components/member/subscription-detail-box.hbs +++ b/ghost/admin/app/components/member/subscription-detail-box.hbs @@ -1,5 +1,5 @@
diff --git a/ghost/admin/app/components/modal-member-tier.hbs b/ghost/admin/app/components/modal-member-tier.hbs index f0736aee40..9b5cde77a6 100644 --- a/ghost/admin/app/components/modal-member-tier.hbs +++ b/ghost/admin/app/components/modal-member-tier.hbs @@ -67,7 +67,6 @@ type="button" {{on "click" this.close}} {{!-- disable mouseDown so it does not trigger focus-out validations --}} - {{!-- template-lint-disable no-down-event-binding --}} {{on "mousedown" (optional this.noop)}} data-test-button="cancel-webhook" > diff --git a/ghost/admin/app/components/modals/confirm-unsaved-changes.hbs b/ghost/admin/app/components/modals/confirm-unsaved-changes.hbs index 25ca7dac62..2c996fbbca 100644 --- a/ghost/admin/app/components/modals/confirm-unsaved-changes.hbs +++ b/ghost/admin/app/components/modals/confirm-unsaved-changes.hbs @@ -2,7 +2,7 @@ - +