1
我在Mac上使用带有ESLint的Atom编辑器。我需要删除具有脚本标记的html文件,以便安装eslint-plugin-html和linter-eslint。但是,我的一些html文件中包含django代码,ESLint报告错误。 解析错误。意外的令牌%。请告知ESLint如何忽略此类服务器端代码。这里是我的html文件看起来像Atom ESLint忽略服务器端语言代码
// some html here
<script>
var foo = {
{% for item in items %}
{% if item == "foo" %}
'foo': 'foo'
// etc