@salesforcedevs/sfdocs-liquid-lint-filtered-blocks
v1.0.6
Published
Validates structural issues in liquid filter blocks (englishonly, future, etc.).
Maintainers
Keywords
Readme
liquid-lint-filtered-blocks
This remark-lint plugin validates structural issues in Liquid filter blocks
({% englishonly %} / {% endenglishonly %}, {% future %} / {% endfuture %},
etc.) within sfdocs Markdown files.
What it checks
- Redundant nesting: a filter block inside another block of the same type is redundant and likely a copy-paste mistake.
- Entire file wrapped: when all non-frontmatter content is inside a single
filter block, the topic should use
filters: [<tag>]in the TOC instead. - Empty headings after removal: headings outside a filter block whose entire section body is inside that block would render as empty headings in filtered builds.
Options
{
filterTags?: string[]
}An array of Liquid filter tag names to validate (e.g. ["englishonly", "future"]).
Each tag is checked independently.
Install & build
yarn install && yarn buildRelease versioning and commits are automated via Lerna when you merge the release PR.
