简体   繁体   English

在JSHint中禁用格式警告

[英]Disabling formatting warnings in JSHint

I've just decided to run my JavaScript through JSHint (using the WebEssentials extension within Visual Studio). 我刚刚决定通过JSHint(使用Visual Studio中的WebEssentials扩展)运行我的JavaScript。 I'm getting a whole bunch of warnings about formatting, which fight against the Visual Studio auto-formatting (which I prefer). 我收到大量有关格式化的警告,这些警告与Visual Studio自动格式化(我更喜欢)作斗争。 I'd like to turn these warnings off but I can't figure out how. 我想关闭这些警告,但我不知道怎么做。

I can't see anything in the JSHint Documentation that relates to whitespace/function formatting. 我看不到JSHint文档中与空格/函数格式相关的任何内容。

I also don't get any warning numbers out so I don't think I can exclude by warning: 我也没有得到任何警告数字,所以我认为我不能通过警告排除:

在此处输入图片说明

Does anyone know how I can go about excluded these? 有谁知道我该如何排除这些?

Your problems stems from JavaScript Code Style 您的问题源于JavaScript代码样式

You can edit those settings from the Web Essentials menu, then select the Edit Global JSCS settings option. 您可以从Web Essentials菜单中编辑这些设置,然后选择“编辑全局JSCS设置”选项。 (I hope. I've never even opened Visual Studio in my life). (我希望。我一生中从未打开过Visual Studio)。

You can read up on the rules here 您可以在这里阅读规则

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

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