@salesforcedevs/sfdocs-liquid-lint-syntax
v1.0.7
Published
Statically validate Liquid templating in sfdocs Markdown files.
Maintainers
Keywords
Readme
liquid-lint-syntax
This Markdown plugin surfaces Liquid parse-time errors in sfdocs content during
linting. It runs only for files that contain a {% tag.
What it does
The rule itself does not parse Liquid. It only runs when the file contains a
{% tag, then delegates to a check function passed in via options:
check({ contents, sourcePath }) => Promise<{ message, line, column }[]>@salesforcedevs/sfdocs-doc-framework supplies this check at wire-up time so
the linter reports exactly the parse-time errors the framework itself would
raise. For each finding returned, the rule emits a
Liquid syntax error: <message> on the reported line/column. If no check is
provided, the rule is a no-op.
Why
Today these errors only surface when SSG or LWR runs. This plugin moves them to
yarn validate so writers see a clear pre-build failure on the offending line.
Install & build
yarn install && yarn buildRelease versioning and commits are automated via Lerna when you merge the release PR.
