25

How might I disable JSCS in the latest version of Web Essentials for Visual Studio 2013?

I was unable to find a relevant option in the menu.

I tried setting the JSCS configuration to ignore all files. This caused it to occasionally generate messages that wouldn't leave my Error List panel until I cleaned the solution.

4

3 回答 3

15

我发现这个设置文件似乎让它安静了很多。您可以在 Web Essentials > 编辑全局 JSCS 设置中找到它。

{
    "requireCurlyBraces": ["if"],

    "excludeFiles": ["**"],
    "validateJSDoc": {
        "checkParamNames": true,
        "requireParamTypes": true
    }
}

它实质上禁用了 JSCS,同时保持 JSHint 处于打开状态。希望这会有所帮助。

于 2014-06-13T14:59:54.497 回答
12

Web Essentials 2013 for Update 4 支持一个.weignore文件,您可以在其中独立禁用 JSCS 或其他 linter 和编译器。

https://github.com/madskristensen/WebEssentials2013/pull/1250

创建一个.weignore文件并添加以下行:

**\*.js jscs

这是行的部分和部分tab之间的字符。*.jsjscs

.weignore您可以在用户文件夹 (C:\Users\username) 或项目或解决方案文件夹中创建全局文件。

于 2015-01-08T23:35:44.320 回答
1

在您的项目根目录中创建一个文件 .jscsrc(例如,通过命令行:echo x > .jscsrc)。然后使用以下内容:

{
    "excludeFiles": ["**"]
}

我只是想将所有项目设置放在一起,避免需要在开发人员之间手动同步的全局设置。

于 2015-04-16T15:26:18.550 回答