A zero-dependency Node.js linter for Shopify Liquid templates. It flags deprecated tags and filters, accessibility problems, and inline styles that are easy to miss during manual review.
Shopify themes accumulate small mistakes over time: the deprecated include tag instead of render, the deprecated img_url filter instead of image_url, img tags with no alt attribute, and inline style attributes scattered through markup. None of these break a theme, but they quietly hurt accessibility, SEO and maintainability. This linter scans a theme's Liquid files and reports each occurrence with a file and line number.
git clone https://github.com/EcomswiftLLC/shopify-liquid-linter.git
cd shopify-liquid-linter
No dependencies to install. It only uses Node's built in fs and path modules.
node bin/lint.js THEME_PATH
Example: node bin/lint.js ./my-theme
Add --json to print a machine readable report instead of the human readable one. The process exits with code 1 when issues are found, so it can be wired into CI.
no-deprecated-include flags the include tag and suggests render. no-deprecated-img-url flags the img_url filter and suggests image_url. img-missing-alt flags img tags with no alt attribute. no-inline-style flags elements with an inline style attribute and suggests a CSS class instead.
npm test
Issues and pull requests that add new rules are welcome. Good candidates include flagging hardcoded strings that should go through the translation filter, or flagging deprecated section schema settings.
This project is maintained by Ecom Swift LLC, a Shopify Partner.
- 🛍️ Shopify Partner Directory: https://www.shopify.com/partners/directory/partner/waowy
- ✉️ Email: support@ecomswiftllc.com
- 💬 WhatsApp: https://wa.me/16312511767
MIT