Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在 Sublime 中使用 JSHint 关闭缺少的分号警告。我在互联网上尝试了多种方法均无济于事。
asi是 sublime linter 中的一个选项,当设置为 true 时将抑制分号警告。
asi
查看JSHint 信息
了解更多信息。
最终,您需要.jshintrc在应用根文件夹中创建一个文件,并在其中添加以下代码:
.jshintrc
{ "asi": true, }
将文件类型设置为json,保存并重启你的ide。
json
通过在 .js Javascript 文件的开头插入以下行应该可以工作:
/*jshint -W033 */