Skip to content

Latest commit

 

History

History
50 lines (38 loc) · 1.13 KB

missing_enable_comment.md

File metadata and controls

50 lines (38 loc) · 1.13 KB

Prevent missing theme-check-enable comments (MissingEnableComment)

When theme-check-disable is used in the middle of a theme file, the corresponding theme-check-enable comment should also be included.

Check Details

This check aims at eliminating missing theme-check-enable comments.

👎 Example of incorrect code for this check:

<!doctype html>
<html>
  <head>
    {% # theme-check-disable ParserBlockingJavaScript %}
    <script src="https://cdnjs.com/jquery.min.js"></script>
  </head>
  <body>
    <!-- ... -->
  </body>
</html>

👍 Example of correct code for this check:

<!doctype html>
<html>
  <head>
    {% # theme-check-disable ParserBlockingJavaScript %}
    <script src="https://cdnjs.com/jquery.min.js"></script>
    {% # theme-check-enable ParserBlockingJavaScript %}
  </head>
  <body>
    <!-- ... -->
  </body>
</html>

Version

This check has been introduced in Theme Check 0.3.0.

Resources