Theme Check is a linter for the Liquid and JSON inside your theme. It detects errors and enforces Shopify theme and Liquid best practices.
Theme Check can identify several issues in your theme code. For example, it can identify the following:
- Liquid syntax errors
- Missing templates
- Unused variables and snippets
- Unknown and deprecated tags
- Excessive snippet nesting
- Performance issues
Programming and style errors display directly in your console or code editor. Each error includes a link to the failed check's documentation, allowing you to debug issues quickly.
You can use Theme Check in the following ways:
- Through Shopify CLI - Run checks against your theme on demand.
- As a Visual Studio Code plugin - Add Theme Check to Visual Studio Code to get real-time validation of your theme code, including errors and auto-completion.
- As a plugin for another editor - Integrate Theme Check with any editor that implements an LSP client.
Creating your own checks
Using Theme Check in other editors
Theme Check is implemented using the Language Server Protocol (LSP). This means that you can implement Theme Check as a language server in any editor that implements an LSP client. View some example implementations in the Theme Check repo.
Contributing to Theme Check
Theme Check, and the Shopify Liquid Visual Studio Code extension, is open source.