Skip to content

Commit 611b7e5

Browse files
committed
fix: remove ValidScopedCSSClass from recommended config
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.
1 parent 54e1418 commit 611b7e5

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@shopify/theme-check-common': patch
3+
'@shopify/theme-check-node': patch
4+
---
5+
6+
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.

packages/theme-check-common/src/checks/valid-scoped-css-class/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export const ValidScopedCSSClass: LiquidCheckDefinition = {
7676
docs: {
7777
description:
7878
'Reports CSS classes used in HTML class attributes that are not defined in any in-scope stylesheet tag or CSS asset file.',
79-
recommended: true,
79+
recommended: false,
8080
url: 'https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/valid-scoped-css-class',
8181
},
8282
type: SourceCodeType.LiquidHtml,

packages/theme-check-node/configs/recommended.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,9 +174,6 @@ ValidSchemaName:
174174
ValidSchemaTranslations:
175175
enabled: true
176176
severity: 0
177-
ValidScopedCSSClass:
178-
enabled: true
179-
severity: 1
180177
ValidSettingsKey:
181178
enabled: true
182179
severity: 0

0 commit comments

Comments
 (0)