简体   繁体   English

JSLint - 在Visual Studio 2015中构建时忽略文件夹

[英]JSLint - ignoring folder when building in Visual Studio 2015

I want to implement javascript code and style checking with JSLint . 我想用JSLint实现javascript代码和样式检查。 I installed JSLint.NET for Visual Studio . JSLint.NET for Visual Studio安装了JSLint.NET for Visual Studio

Now i want to exclude all the javascript files that are included from external libraries like datatables , jquery , .. also my own minified files need to be excluded. 现在我想排除外部库中包含的所有javascript文件,如datatablesjquery ,..还需要排除我自己的缩小文件。

My project configurations are added in the JSLintNet.json file: 我的项目配置添加在JSLintNet.json文件中:

{
  "version": "2.2.0",
  "output": "Error",
  "ignore": [
    "\\Scripts\\angular-datatables\\plugins\\tabletools\\",
    "\\Scripts\\angular-datatables\\plugins\\fixedcolumns\\angular-datatables.fixedcolumns.js",
    "\\Scripts\\angular-datatables\\plugins\\fixedcolumns\\angular-datatables.fixedcolumns.min.js"
  ],
  "options": {},
  "globalVariables": [],
  "runOnBuild": true
}

Whatever path i provide here, is it a folder or a file. 无论我在这里提供什么路径,它是文件夹还是文件。 The code analysis still keeps running. 代码分析仍在继续运行。 It is important that i can ignore certain files/ folder for JSLint to be practical. 重要的是我可以忽略某些文件/文件夹以使JSLint变得切实可行。

How can i solve the ignoring of folders and files, perhaps even certain extensions. 如何解决忽略文件夹和文件,甚至某些扩展的问题。

I have had this problem and am not certain whether this is the right answer: however, it usually works for me. 我遇到了这个问题,我不确定这是否是正确的答案:但是,它通常适用于我。 It seems that JSLint.Net only parses the configuration file on startup; 看来JSLint.Net只在启动时解析配置文件; so if you edit JSLintNet.json, quit VisualStudio and restart it. 因此,如果您编辑JSLintNet.json,请退出VisualStudio并重新启动它。

I'm using Visual Studio 2013, version 12.0.40629.00 with JSLint.Net 2.2.0 我正在使用Visual Studio 2013,版本12.0.40629.00与JSLint.Net 2.2.0

Hope this helps. 希望这可以帮助。

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

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