From 611b7e522fb9da3de5aaa2ceb4e665bd97b7463f Mon Sep 17 00:00:00 2001 From: Alok Swamy Date: Fri, 17 Apr 2026 15:07:00 -0400 Subject: [PATCH] fix: remove ValidScopedCSSClass from recommended config MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Temporary fix while performance issues are resolved. The check re-parses every {% stylesheet %} tag in the theme on every save, causing severe lag in VS Code on larger themes (reported in #1179 — "Getting code actions from Shopify Liquid" hangs for several seconds on save in v3.11.2). The check remains available as an opt-in rule in the :all preset. It will be re-added to :recommended once the language-server performance work in progress (PR forthcoming) lands. --- .changeset/disable-valid-scoped-css-class-recommended.md | 6 ++++++ .../src/checks/valid-scoped-css-class/index.ts | 2 +- packages/theme-check-node/configs/recommended.yml | 3 --- 3 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 .changeset/disable-valid-scoped-css-class-recommended.md diff --git a/.changeset/disable-valid-scoped-css-class-recommended.md b/.changeset/disable-valid-scoped-css-class-recommended.md new file mode 100644 index 000000000..1c8eb1bac --- /dev/null +++ b/.changeset/disable-valid-scoped-css-class-recommended.md @@ -0,0 +1,6 @@ +--- +'@shopify/theme-check-common': patch +'@shopify/theme-check-node': patch +--- + +Temporarily remove `ValidScopedCSSClass` from the recommended config. The check causes severe save lag in VS Code on larger themes (see [#1179](https://github.com/Shopify/theme-tools/issues/1179)) because it re-parses every `{% stylesheet %}` tag in the theme on every save. It remains available as an opt-in check. Will be re-enabled once the performance issue is resolved. diff --git a/packages/theme-check-common/src/checks/valid-scoped-css-class/index.ts b/packages/theme-check-common/src/checks/valid-scoped-css-class/index.ts index 4f043fa1c..5e8059ae6 100644 --- a/packages/theme-check-common/src/checks/valid-scoped-css-class/index.ts +++ b/packages/theme-check-common/src/checks/valid-scoped-css-class/index.ts @@ -76,7 +76,7 @@ export const ValidScopedCSSClass: LiquidCheckDefinition = { docs: { description: 'Reports CSS classes used in HTML class attributes that are not defined in any in-scope stylesheet tag or CSS asset file.', - recommended: true, + recommended: false, url: 'https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/valid-scoped-css-class', }, type: SourceCodeType.LiquidHtml, diff --git a/packages/theme-check-node/configs/recommended.yml b/packages/theme-check-node/configs/recommended.yml index 542e6d453..0ebc31660 100644 --- a/packages/theme-check-node/configs/recommended.yml +++ b/packages/theme-check-node/configs/recommended.yml @@ -174,9 +174,6 @@ ValidSchemaName: ValidSchemaTranslations: enabled: true severity: 0 -ValidScopedCSSClass: - enabled: true - severity: 1 ValidSettingsKey: enabled: true severity: 0