@shopify/theme-check-common@3.28.0
Minor Changes
-
6803e99: Adopt the hand-written
liquid-html-parserfor performanceReplace the parser-combinator-based Liquid/HTML parser with a hand-written
recursive-descent parser. The new parser is significantly faster, adds
resilient parsing (it recovers from malformed input instead of bailing), and is
adapted to the theme-tools source model.theme-language-server-common,
theme-check-common,prettier-plugin-liquid, andtheme-graphare updated to
consume the new parser. -
6803e99: Port additional theme-check checks
Add the following checks:
LiquidComplexity-- Reports Liquid files with high cyclomatic complexity (default threshold 120).LiquidNestingDepth-- Reports Liquid files with deeply nested control-flow structures (default max depth 10).LiquidSyntaxError-- Reports Liquid syntax errors.MaxFileSize-- Reports theme files that exceed Shopify's maximum per-file size.ExcessiveSettingsCount-- Reports section/block schemas declaring more top-level settings than the max (default 40).BlockArgumentSettingCollision-- Reports a plain block-tag argument whose name matches a setting id in the block's schema.DuplicateBlockArguments-- Reports duplicate argument names in a block tag.MissingBlockArguments-- Reports required{% doc %}arguments not provided on a block tag.UnknownBlockSetting-- Reports ablock.settings.<name>argument where<name>is not in the block's schema.UnrecognizedBlockArguments-- Reports block-tag arguments not declared in the block's{% doc %}tag.ValidBlockArgumentTypes-- Reports type mismatches between block-tag arguments and their{% doc %}declarations.SchemaOncePerFile-- Reports when{% schema %}appears more than once in a file.SchemaSectionOrBlockOnly-- Reports{% schema %}used outside section or block files.StylesheetOncePerFile-- Reports when{% stylesheet %}appears more than once in a file.StylesheetTagInWrongFile-- Reports{% stylesheet %}used outside section, block, or snippet files.JavascriptOncePerFile-- Reports when{% javascript %}appears more than once in a file.JavascriptTagInWrongFile-- Reports{% javascript %}used outside section, block, or snippet files.
RequiredLayoutThemeObjectnow flags anylayout/*.liquidfile missing the required theme objects, not justlayout/theme.liquid.
Patch Changes
- Updated dependencies [6803e99]
- @shopify/liquid-html-parser@2.10.0