Selectively disable VS Code JS validation errors in HTML-embedded scripts?

Viewed 116

I'm using the onclick attribute in Django HTML templates to dynamically set arguments to JavaScript function calls, like this:

<button onclick="activateSomething( argumentOne, {{ some_django_var }} )">Click Me</button>

VS Code's built-in embedded-scripts validation for HTML flags several syntax errors in such a construction, however, because it doesn't understand the Django template syntax. I could disable that validation, but that would be overkill, I still need the validation in other areas of my templates.

So the question is, is it currently possible to disable only specific JS errors, perhaps on a line-by-line basis à la # pylint: disable=some-error-type?

0 Answers
Related