【发布时间】:2016-12-26 00:27:58
【问题描述】:
我在 Mac 上使用带有 ESLint 的 Atom 编辑器。我需要对具有脚本标签的 html 文件进行 lint,因此我安装了 eslint-plugin-html 和 linter-eslint。但是,我的一些 html 文件中包含 django 代码,并且 ESLint 报告错误。 解析错误。意外的令牌 %。请告知 ESLint 如何忽略此类服务器端代码。这是我的 html 文件的样子
// some html here
<script>
var foo = {
{% for item in items %}
{% if item == "foo" %}
'foo': 'foo'
// etc
【问题讨论】:
标签: atom-editor eslint