[英]How can I disable JSCS in Web Essentials for Visual Studio 2013?
How might I disable JSCS in the latest version of Web Essentials for Visual Studio 2013? 如何在最新版本的Visual Studio 2013 Web Essentials中禁用JSCS?
I was unable to find a relevant option in the menu. 我无法在菜单中找到相关选项。
I tried setting the JSCS configuration to ignore all files. 我尝试将JSCS配置设置为忽略所有文件。 This caused it to occasionally generate messages that wouldn't leave my Error List panel until I cleaned the solution.
这导致它偶尔生成的消息在我清除解决方案之前不会离开我的错误列表面板。
I've found this settings file seems to quiet it down quite a bit. 我发现这个设置文件似乎很平静了。 You can find this in Web Essentials > Edit Global JSCS settings.
您可以在Web Essentials>编辑全局JSCS设置中找到它。
{
"requireCurlyBraces": ["if"],
"excludeFiles": ["**"],
"validateJSDoc": {
"checkParamNames": true,
"requireParamTypes": true
}
}
It essentially disables JSCS while keeping JSHint open. 它实际上禁用了JSCS,同时保持JSHint打开。 Hopefully that helps.
希望这会有所帮助。
Web Essentials 2013 for Update 4 supports a .weignore
file where you can disable JSCS, or other linters and compilers, independently of each other. Web Essentials 2013 for Update 4支持
.weignore
文件,您可以在其中相互独立地禁用JSCS或其他链接和编译器。
See https://github.com/madskristensen/WebEssentials2013/pull/1250 请参阅https://github.com/madskristensen/WebEssentials2013/pull/1250
Create a .weignore
file and add the following line: 创建
.weignore
文件并添加以下行:
**\*.js jscs
That's a tab
character between the *.js
and the jscs
parts of the line. 这是
*.js
和行的jscs
部分之间的tab
符。
You can create a global .weignore
file in your user folder (C:\\Users\\username), or in your project or solution folder. 您可以在用户文件夹(C:\\ Users \\ username)或项目或解决方案文件夹中创建全局
.weignore
文件。
Create a file .jscsrc in your project-root (eg via the command line: echo x > .jscsrc). 在项目根目录中创建一个.jscsrc文件(例如,通过命令行:echo x> .jscsrc)。 Then use the following content:
然后使用以下内容:
{
"excludeFiles": ["**"]
}
I just like to keep all the project-settings together and avoid global settings that need to be synchronized between developers manually. 我只想将所有项目设置保持在一起,并避免需要在开发人员之间手动同步的全局设置。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.