简体   繁体   English

JSHint:关闭丢失的分号警告

[英]JSHint: Turn off missing semicolon warning

How do I turn off missing semicolon warnings with JSHint in Sublime. 如何在Sublime中使用JSHint关闭缺少的分号警告。 I have tried multiple things on the internet to no avail. 我在互联网上尝试过多种东西都无济于事。

asi is an option within the sublime linter that will suppress the semicolon warnings when set to true. asi是sublime linter中的一个选项,它将在设置为true时抑制分号警告。

See JSHint Info 请参阅JSHint Info

For additional information. 有关其他信息。

Ultimately, you'll want to create a .jshintrc file in your app root folder and add the following code inside: 最后,您需要在app根文件夹中创建一个.jshintrc文件,并在其中添加以下代码:

{
   "asi": true,
}

Set the file type as json , save it and restart your ide. 将文件类型设置为json ,保存并重新启动ide。

By inserting the following line at the beginning of your .js Javascript file should work: 通过在.js Javascript文件的开头插入以下行应该可以正常工作:

/*jshint -W033 */ / * jshint -W033 * /

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM