ejs - 如何阻止 csslint 和 jshint 对 Atom 中的 EJS 进行 linting?

标签 ejs atom-editor jshint csslint

我正在 Atom 中编辑 EJS 文件。我目前安装了 linter-csslint 和 linter-jshint 软件包。两者似乎都将 .ejs 文件识别为 .html 并将其检查为 HTML。

这就是我所看到的

enter image description here

如何让 linter 忽略 .ejs 文件?或者是否有针对 Atom 的 EJS 特定 linter?

最佳答案

您可以使用 .jshintignore 文件 ( https://jshint.com/docs/cli/#ignoring-files ) 忽略所有 .ejs 文件。我刚刚自己添加了一个来解决 Atom 中的同一问题,并且似乎有效。

我使用以下内容创建了 ~/.jshintignore:

*.ejs

值得注意的是,这会影响使用 jshint 的其他任何内容。

关于ejs - 如何阻止 csslint 和 jshint 对 Atom 中的 EJS 进行 linting?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52987984/

相关文章:

windows-10 - Windows 10 上 Atom 安装错误

javascript - JsHint - 隐藏此消息 : ES5 option is now set per default

javascript - Express + EJS - 将参数传递给 EJS View

mysql - 使用node.js和ejs从mysql下载PDF

node.js - Jade 和 EJS 对于 Node.js 模板的优缺点是什么?

html - 如何删除原子上的键绑定(bind)解析器弹出窗口

JavaScript 动态对象键 ejs

bash - Atom Snippets 不适用于 Shell 脚本

javascript - 当明确定义时,jshint 在 gulp 任务中抛出 TypeError

javascript - JSHint 表示 "Argument types do not match parameters"用于 jQuery(this)