fix: remove ValidScopedCSSClass from recommended config (temp)#1180
Merged
Conversation
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.
graygilmore
approved these changes
Apr 17, 2026
3 tasks
aswamy
added a commit
that referenced
this pull request
Apr 20, 2026
Moves per-file CSS class extraction onto the language server's AugmentedLiquidSourceCode so it is memoized per file version and invalidated automatically when a document changes. Eliminates the full-theme rescan that ran on every save. Also skips syntax-tree parsing for Liquid files with no stylesheet tag, cutting first-save and CLI-run costs. Re-enables ValidScopedCSSClass in the recommended config, reversing the temporary opt-out from #1180. Fixes #1179.
aswamy
added a commit
that referenced
this pull request
Apr 20, 2026
Moves per-file CSS class extraction onto the language server's AugmentedLiquidSourceCode so it is memoized per file version and invalidated automatically when a document changes. Eliminates the full-theme rescan that ran on every save. Also skips syntax-tree parsing for Liquid files with no stylesheet tag, cutting first-save and CLI-run costs. Re-enables ValidScopedCSSClass in the recommended config, reversing the temporary opt-out from #1180. Fixes #1179.
aswamy
added a commit
that referenced
this pull request
Apr 20, 2026
Moves per-file CSS class extraction onto the language server's AugmentedLiquidSourceCode so it is memoized per file version and invalidated automatically when a document changes. Eliminates the full-theme rescan that ran on every save. Also skips syntax-tree parsing for Liquid files with no stylesheet tag, cutting first-save and CLI-run costs. Re-enables ValidScopedCSSClass in the recommended config, reversing the temporary opt-out from #1180. Fixes #1179.
aswamy
added a commit
that referenced
this pull request
Apr 22, 2026
Moves per-file CSS class extraction onto the language server's AugmentedLiquidSourceCode so it is memoized per file version and invalidated automatically when a document changes. Eliminates the full-theme rescan that ran on every save. Also skips syntax-tree parsing for Liquid files with no stylesheet tag, cutting first-save and CLI-run costs. Re-enables ValidScopedCSSClass in the recommended config, reversing the temporary opt-out from #1180. Fixes #1179.
aswamy
added a commit
that referenced
this pull request
Apr 23, 2026
Moves per-file CSS class extraction onto the language server's AugmentedLiquidSourceCode so it is memoized per file version and invalidated automatically when a document changes. Eliminates the full-theme rescan that ran on every save. Also skips syntax-tree parsing for Liquid files with no stylesheet tag, cutting first-save and CLI-run costs. Re-enables ValidScopedCSSClass in the recommended config, reversing the temporary opt-out from #1180. Fixes #1179.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
recommended: falseon theValidScopedCSSClasscheckpackages/theme-check-node/configs/recommended.yml(factory-generated file)This is a temporary fix while we resolve performance issues for this theme-check on VS Code. The check was introduced in v3.11.2 and causes severe save lag on larger themes — users report VS Code hanging for several seconds on every save with a "Getting code actions from 'Shopify Liquid'" message (see #1179).
Root cause: every save re-parses every `{% stylesheet %}` tag in the theme to build the in-scope CSS class set. On a 240-file theme that's ~128 liquid-HTML + postcss parses per save.
A performance fix (session-level caching of per-file CSS classes + substring short-circuit before AST parse) is in progress and will be landed as a separate PR. Once that ships and is validated on large themes, we'll flip this check back to `recommended: true`.
Impact
Test plan
🤖 Generated with Claude Code