You can run the following checks as part of Theme Check. Each check identifies a specific error or a place in your code where a best practice is not being followed.

To learn more about the check and its options, click on the name of the check.

## Liquid file checks

These checks analyze the style and validity of Liquid code. Some of these checks support auto-correction using the `--auto-correct` flag.

<table>
  <thead>
    <tr>
      <th>Check</th>
      <th>Severity</th>
      <th>Purpose</th>
      <th>Auto-correction</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a href="/docs/storefronts/themes/tools/theme-check/checks/app-block-valid-tags">AppBlockValidTags</a></td>
      <td>Error</td>
      <td>Identifies forbidden Liquid tags in theme app extension app block and app embed block code.</td>
      <td></td>
    </tr>
    <tr>
      <td><a href="/docs/storefronts/themes/tools/theme-check/checks/asset-preload">AssetPreload</a></td>
      <td>Warning</td>
      <td>Encourages preloading of assets using Liquid filters, rather than HTML attributes.</td>
    </tr>
    <tr>
      <td><a href="/docs/storefronts/themes/tools/theme-check/checks/app-block-valid-tags">AssetSizeAppBlockCSS</a></td>
      <td>Error</td>
      <td>Prevents theme app extensions from using CSS files larger than the configured threshold.</td>
    </tr>
    <tr>
      <td>
        <a href="/docs/storefronts/themes/tools/theme-check/checks/app-block-valid-tags">AssetSizeAppBlockJavascript</a>
      </td>
      <td>Error</td>
      <td>
        Prevents theme app extensions from using JavaScript files and external scripts with a compressed size larger
        than the configured threshold.
      </td>
    </tr>
    <tr>
      <td><a href="/docs/storefronts/themes/tools/theme-check/checks/asset-size-css">AssetSizeCSS</a></td>
      <td>Error</td>
      <td>Prevents themes from using CSS files larger than the configured threshold.</td>
    </tr>
    <tr>
      <td><a href="/docs/storefronts/themes/tools/theme-check/checks/asset-size-javascript">AssetSizeJavaScript</a></td>
      <td>Error</td>
      <td>
        Prevents using theme JavaScript files and external scripts with a compressed size greater than the configured
        threshold.
      </td>
    </tr>
    <tr>
      <td><a href="/docs/storefronts/themes/tools/theme-check/checks/block-id-usage">BlockIdUsage</a></td>
      <td>Warning</td>
      <td>
        Warns against the use of block IDs in conditional statements and case statements.
      </td>
    </tr>
    <tr>
      <td>
        <a href="/docs/storefronts/themes/tools/theme-check/checks/cdn-preconnect">CdnPreconnect</a>
      </td>
      <td>Warning</td>
      <td>This check is aimed at signaling the redundant preconnect to Shopify's CDN.</td>
      <td></td>
    </tr>
    <tr>
      <td>
        <a href="/docs/storefronts/themes/tools/theme-check/checks/cdn-preconnect">ContentForHeaderModification</a>
      </td>
      <td>Error</td>
      <td>Identifies code that tries to parse <code>content_for_header</code> .</td>
      <td></td>
    </tr>
    <tr>
      <td><a href="/docs/storefronts/themes/tools/theme-check/checks/deprecate-bgsizes">DeprecateBgsizes</a></td>
      <td>Warning</td>
      <td>Discourages use of the bgset extension instead of the image-set attribute for loading background images.</td>
    </tr>
    <tr>
      <td><a href="/docs/storefronts/themes/tools/theme-check/checks/deprecate-lazysizes">DeprecateLazysizes</a></td>
      <td>Warning</td>
      <td>Discourages use of the lazysizes library for lazy loading images, iframes, and scripts.</td>
    </tr>
    <tr>
      <td><a href="/docs/storefronts/themes/tools/theme-check/checks/deprecated-filter">DeprecatedFilter</a></td>
      <td>Warning</td>
      <td>Discourages using deprecated filters in themes.</td>
      <td>Yes</td>
    </tr>
    <tr>
      <td><a href="/docs/storefronts/themes/tools/theme-check/checks/deprecated-tag">DeprecatedTag</a></td>
      <td>Error</td>
      <td>Discourages using deprecated tags in themes.</td>
      <td></td>
    </tr>
    <tr>
      <td><a href="/docs/storefronts/themes/tools/theme-check/checks/empty-block-content">EmptyBlockContent</a></td>
      <td>Warning</td>
      <td>Detects instances where the Liquid tag <code>{% content_for 'blocks' %}</code> is used when the associated schema <code>blocks</code> array is empty or undefined.</td>
      <td></td>
    </tr>
    <tr>
      <td><a href="/docs/storefronts/themes/tools/theme-check/checks/img-lazy-loading">ImgWidthAndHeight</a></td>
      <td>Error</td>
      <td>Enforces setting the <code>width</code> and <code>height</code> attributes on <code>img</code> tags.</td>
    </tr>
    <tr>
      <td><a href="/docs/storefronts/themes/tools/theme-check/checks/liquid-free-settings">LiquidFreeSettings</a></td>
      <td>Warning</td>
      <td>Identifies when a theme is using the  <code>{% liquid %}</code>  tag within <code>Settings</code> values.</td>
    </tr>
    <tr>
      <td><a href="/docs/storefronts/themes/tools/theme-check/checks/liquid-html-syntax-error">LiquidHTMLSyntaxError</a></td>
      <td>Error</td>
      <td>Identifies Liquid and HTML syntax errors.</td>
      <td></td>
    </tr>
    <tr>
      <td><a href="/docs/storefronts/themes/tools/theme-check/checks/missing-asset">MissingAsset</a></td>
      <td>Error</td>
      <td>Makes sure that all asset files referenced by the <code>asset_url</code> filter exist.</td>
      <td></td>
    </tr>
    <tr>
      <td><a href="/docs/storefronts/themes/tools/theme-check/checks/app-block-missing-schema">AppBlockMissingSchema</a></td>
      <td>Error</td>
      <td>Ensures schema is present in app blocks in theme app extensions.</td>
      <td></td>
    </tr>
    <tr>
      <td><a href="/docs/storefronts/themes/tools/theme-check/checks/missing-asset">MissingTemplate</a></td>
      <td>Warning</td>
      <td>
        Identifies when a resource is referenced using a <code>render</code> , <code>section</code> , or
        <code>include</code> tag, but doesn't exist.
      </td>
      <td>Yes</td>
    </tr>
    <tr>
      <td><a href="/docs/storefronts/themes/tools/theme-check/checks/pagination-size">PaginationSize</a></td>
      <td>Warning</td>
      <td>Ensures that objects are paginated with performant sizes so too many objects are not loaded at once.</td>
    </tr>
    <tr>
      <td><a href="/docs/storefronts/themes/tools/theme-check/checks/parser-blocking-javascript">ParserBlockingJavaScript</a></td>
      <td>Error</td>
      <td>Identifies script tags that don't have defer or async attributes, avoiding parser-blocking JavaScript.</td>
    </tr>
    <tr>
      <td><a href="/docs/storefronts/themes/tools/theme-check/checks/remote-asset">RemoteAsset</a></td>
      <td>Warning</td>
      <td>Discourages use of third party domains for hosting assets.</td>
    </tr>
    <tr>
      <td>
        <a href="/docs/storefronts/themes/tools/theme-check/checks/required-layout-theme-object">RequiredLayoutThemeObject</a>
      </td>
      <td>Error</td>
      <td>
        Makes sure that the theme.liquid layout file contains the required 
        <code>{{ content_for_header }}</code>  and  <code>{{ content_for_layout }}</code>  objects.
      </td>
      <td>Yes</td>
    </tr>
    <tr>
      <td>
        <a href="/docs/storefronts/themes/tools/theme-check/checks/schema-presets-block-order">SchemaPresetsBlockOrder</a>
      </td>
      <td>Warning</td>
      <td>
        Makes sure that the section and block schema presets are correctly used in the 
        <code>block_order</code>.
      </td>
      <td></td>
    </tr>
    <tr>
      <td><a href="/docs/storefronts/themes/tools/theme-check/checks/schema-presets-static-blocks">SchemaPresetsStaticBlocks</a></td>
      <td>Error</td>
      <td>
        Warns if a preset static block doesn't have a 
        <code>{% content_for "block" ... %}</code> tag in the Liquid code.
      </td>
      <td></td>
    </tr>
    <tr>
      <td><a href="/docs/storefronts/themes/tools/theme-check/checks/translation-key-exists">TranslationKeyExists</a></td>
      <td>Error</td>
      <td>Identifies references to translations that don't exist.</td>
      <td></td>
    </tr>
    <tr>
      <td><a href="/docs/storefronts/themes/tools/theme-check/checks/unclosed-html-element">UnclosedHTMLElement</a></td>
      <td>Error</td>
      <td>Identifies instances of unclosed HTML elements in branching code.</td>
      <td></td>
    </tr>
    <tr>
      <td><a href="/docs/storefronts/themes/tools/theme-check/checks/undefined-object">UndefinedObject</a></td>
      <td>Error</td>
      <td>Identifies references to undefined Liquid objects.</td>
      <td></td>
    </tr>
     <tr>
      <td><a href="/docs/storefronts/themes/tools/theme-check/checks/unique-static-block-id">UniqueStaticBlockId</a></td>
      <td>Error</td>
      <td>Identifies when two static blocks are using the same ID.</td>
      <td></td>
    </tr>
    <tr>
      <td><a href="/docs/storefronts/themes/tools/theme-check/checks/unknown-filter">UnknownFilter</a></td>
      <td>Error</td>
      <td>Identifies references to unknown Liquid filters.</td>
      <td></td>
    </tr>
    <tr>
      <td><a href="/docs/storefronts/themes/tools/theme-check/checks/unused-assign">UnusedAssign</a></td>
      <td>Warning</td>
      <td>Identifies variable definitions that aren't used.</td>
      <td></td>
    </tr>
    <tr>
      <td><a href="/docs/storefronts/themes/tools/theme-check/checks/valid-block-target">ValidBlockTarget</a></td>
      <td>Error</td>
      <td>Identifies when a block is using an invalid target.</td>
      <td></td>
    </tr>
    <tr>
      <td><a href="/docs/storefronts/themes/tools/theme-check/checks/valid-content-for-arguments">ValidContentForArguments</a></td>
      <td>Error</td>
      <td>Identifies invalid arguments passed to the  <code>{% content_for %}</code>  tag</td>
      <td></td>
    </tr>
    <tr>
      <td><a href="/docs/storefronts/themes/tools/theme-check/checks/valid-local-blocks">ValidLocalBlocks</a></td>
      <td>Error</td>
      <td>Identifies when a local block is used incorrectly.</td>
      <td></td>
    </tr>
    <tr>
      <td><a href="/docs/storefronts/themes/tools/theme-check/checks/valid-schema">ValidSchema</a></td>
      <td>Warning</td>
      <td>Identifies invalid JSON in  <code>{% schema %}</code>  tags.</td>
    </tr>
    <tr>
      <td><a href="/docs/storefronts/themes/tools/theme-check/checks/valid-schema-name">ValidSchemaName</a></td>
      <td>Error</td>
      <td>Identifies invalid values for the schema name property.</td>
    </tr>
    <tr>
      <td><a href="/docs/storefronts/themes/tools/theme-check/checks/valid-static-block-type">ValidStaticBlockType</a></td>
      <td>Error</td>
      <td>Identifies when a static block is using an invalid type.</td>
    </tr>
    <tr>
      <td><a href="/docs/storefronts/themes/tools/theme-check/checks/variable-name">VariableName</a></td>
      <td>Warning</td>
      <td>Identifies variable names that don't adhere to a selected naming convention.</td>
    </tr>
  </tbody>
</table>

## JSON file checks

These checks analyze the syntax, content and structure of JSON files.

<table>
  <thead>
    <tr>
      <th>Check</th>
      <th>Severity</th>
      <th>Purpose</th>
      <th>Auto-correction</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a href="/docs/storefronts/themes/tools/theme-check/checks/json-missing-block">JSONMissingBlock</a></td>
      <td>Error</td>
      <td>Identifies when a JSON template file is referencing block types that don't exist.</td>
    </tr>
    <tr>
      <td><a href="/docs/storefronts/themes/tools/theme-check/checks/json-syntax-error">JSONSyntaxError</a></td>
      <td>Error</td>
      <td>Identifies invalid JSON files in themes.</td>
    </tr>
    <tr>
      <td><a href="/docs/storefronts/themes/tools/theme-check/checks/cdn-preconnect">MatchingTranslations</a></td>
      <td>Warning</td>
      <td>Identifies missing or additional translations in locale files.</td>
      <td>Yes</td>
    </tr>
    <tr>
      <td><a href="/docs/storefronts/themes/tools/theme-check/checks/valid-html-translation">ValidHTMLTranslation</a></td>
      <td>Warning</td>
      <td>Identifies invalid HTML inside translations.</td>
    </tr>
  </tbody>
</table>