-
-
Notifications
You must be signed in to change notification settings - Fork 36
Allow re-enabling via twig-cs-fixer-enable #436
Copy link
Copy link
Open
Description
It's possible to disable every rule with twig-cs-fixer-disable since #162. Would be nice to have a matching twig-cs-fixer-enable directive to disable the fixer for a range of lines, rather than for the whole file.
Similar directives that I'm aware of: prettier-ignore-start/end clang-format off/on
My use case is to avoid getting errors for inline JS in templates:
{% block javascripts %}
{# twig-cs-fixer-disable #}
<script>
// ...
// ...
// ...
</script>
{# twig-cs-fixer-enable #}
{% endblock javascripts %}Current workarounds:
- Extracting the script to a separate template and using
twig-cs-fixer-disablethere. - Using
twig-cs-fixer-disable-next-linebefore each line with an error.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels