Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

CdnPreconnect misses `href="https://cdn.shopify.com"` without a trailing path

オープン 初心者向け
#1,365 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@RaphaelFakhri がすでに取り組んでいます。

2026年10月22日 から。

  • #1366 @RaphaelFakhri による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
78/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
typescript
領域
testing-qa

調査の方向性

CdnPreconnect のチェックとそのテストを見つけ、href の値をどのように照合するか、想定される違反をどのように検証するかを読んでください。CDN ホストのみの場合とプロトコル相対 URL の場合に加え、一致しないはずの example.com のパスのケースを追加し、チェックに絞ったテストを実行してください。最初の 2 つのタグが報告され、3 つ目が報告されなければ完了です。

索引モデルが issue の本文から書いたものです。

説明

CdnPreconnect matches the href with the pattern .+cdn.shopify.com.+, wrapped in whitespace anchors. The pattern requires at least one character after cdn.shopify.com, so the most common form of the tag is never reported:

<link rel="preconnect" href="https://cdn.shopify.com" crossorigin>
<link rel="preconnect" href="//cdn.shopify.com">

Because the dots are unescaped and the host is not anchored, the pattern also reports links to other hosts that only contain the text in their path:

<link rel="preconnect" href="https://example.com/cdn.shopify.com.html">

The Ruby theme-check version of this check reported any href that contains cdn.shopify.com, so the first case is a regression from the port.

Expected behavior

The first two tags are reported. The third tag is not reported.

Actual behavior

The first two tags produce no offense. The third tag is reported.

Steps to reproduce

  1. Add <link rel="preconnect" href="https://cdn.shopify.com" crossorigin> to layout/theme.liquid.
  2. Run shopify theme check.
  3. No CdnPreconnect offense appears. Changing the href to https://cdn.shopify.com/ reports the offense.
主要言語
TypeScript
スター
239
フォーク
104
平均マージ
1日 2時間
マージ済み PR(30日)
23

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Shopify/theme-tools のほかの issue

Shopify/theme-tools の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。