Closed pimhakkertgc closed 1 year ago
When using Twig handles in the Javascript of a Twig file, ESLint's parser breaks.
Try using {{ }}, {% %}, or {# #} and the parser will not accept it. Is there a workaround?
{{ }}
{% %}
{# #}
module.exports = { extends: [ 'eslint:recommended' ], plugins: [ 'html' ], settings: { "html/html-extensions": [".html", ".twig", ".html.twig"] }, rules: { "no-undef": "off", "no-empty": "off", "no-unused-vars": "off" }, parserOptions: { ecmaVersion: "latest" }, env: { es6: true } };
See the README Troubleshooting section: https://github.com/BenoitZugmeyer/eslint-plugin-html#linting-templates-or-php
Description
When using Twig handles in the Javascript of a Twig file, ESLint's parser breaks.
Try using
{{ }}
,{% %}
, or{# #}
and the parser will not accept it. Is there a workaround?Setup configuration