- r - 以节省内存的方式增长 data.frame
- ruby-on-rails - ruby/ruby on rails 内存泄漏检测
- android - 无法解析导入android.support.v7.app
- UNIX 域套接字与共享内存(映射文件)
我正在为 Visual Studio 使用 JSHint。 JSHint 对我知道可以安全忽略的问题发出警告的情况并不少见。我一直在相关行上放置 //ignore jslint
,但我看到我们也可以忽略特定的错误代码。来自1.0.0 rc1 release notes :
This version adds a unique numeric code to every warning and error message produced by JSHint. That means that you can now ignore any warning produced by JSHint even when there is no corresponding option for it. You can do that using the special minus (-) operator. For example, here’s how you ignore all messages about trailing decimal points (W047):
/*jshint -W047 */
看起来很酷,但尽我所能,我找不到所有错误代码的列表。 Visual Studio 的警告列表不提供数字错误代码,只提供错误文本。
这个列表肯定在某处,对吧?我真的花了一个小时谷歌搜索这个。但到目前为止还没有成功。
最佳答案
寻找此类内容的最佳地点是源代码(可在 GitHub 上找到)。您要查找的文件是 messages.js
(版本:current release (2.9.5, 2017-06-22)、master branch、2.1.4 (source for the code below)):
var warnings = {
W001: "'hasOwnProperty' is a really bad name.",
W002: "Value of '{a}' may be overwritten in IE 8 and earlier.",
W003: "'{a}' was used before it was defined.",
W004: "'{a}' is already defined.",
// ...
};
关于javascript - 我在哪里可以找到 JSHint 数字错误代码的列表?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17535130/
我正在使用 jshint,它给了我错误“不必要的分号”。 我不控制有问题的文件,我想忽略这个错误。 我在 jshint doc page 上找不到任何此类选项 最佳答案 事实证明,您可以通过为特定错误
我看到在每个目录的基础上指定 JSHint 选项的能力是 added here . 但是,我不清楚您实际上是如何利用这一点的。如何在单个目录中设置 JSH 选项,以便选项与其他目录不同? 最佳答案 似
假设我在一个文件上运行 JSHint。它报告了 83% 的错误。我想要 100% 的错误,但默认情况下它会显示“错误太多”。运行 jshint filename.js ,我将如何解除此限制并显示所有错
我的应用程序中有一个(单个)案例使用了 eval,并且我想仅针对这种情况抑制 JSHint 警告。 有办法实现吗?配置、魔法注释……? 最佳答案 是的,有办法。事实上是两个。在 October 201
尝试运行 jshint 时,我总是得到以下输出: C:\Users\foo\Source\ λ jshint -c .glados-jshintrc gulpfile.js ERROR: Can't
我有一个在我的代码库中使用的模式,它会在 jshint 上抛出一个无聊的警告。 我使用 --verbose 得到了警告的原因。它是W002。 我可以通过添加 /*jshint -W002*/来禁用每个
我正在使用 http://jshint.com/并且还想使用 http://flowtype.org/ .一旦我添加了静态类型,jshint 就会翻转,因为它不理解 : Object function
我正在使用 webpack.DefinePlugin注入(inject)全局常量作为我的构建管道的一部分。然而 jshint 提示常量“未定义”。 从我的 webpack.config.js 中:
我不是 ASI 的粉丝。但考虑到这是完全合法的 JavaScript,jshint(重复 8 次)到底在哪里期望找到分号? script.addEventListener('load', fu
我有这样的情况,我正在通过 gulp 从 vendor 脚本或我的脚本中构建缩小脚本,例如: var paths = { public : './public/javascripts
在对用于前端开发的 IDE 进行了一些综合评估后,我认为 WebStorm 领先。 缺少的一点是我们无法按照我们需要的方式配置 JSHint。 WebStorm 首选项 GUI 提供了一些选项,但不是
这完全是随机发生的。我所做的只是重新启动 Sublime,接下来我知道我必须重新设置 git.exe 的路径,而 SublimeLinter jshint 已损坏。我以各种顺序删除并重新安装了 Sub
我正在尝试 jshint 一些 javascript 文件,但由于某种原因,jshint 的本地 npm 安装无法正常工作。 包在那里: $ npm list --depth=0 testapp@1.
我使用 VIM 作为我的文本编辑器,并使用 Yeoman 来帮助我完成 Web 应用程序开发工作流程。 我已经在使用 vim-jshint帮助我从 VIM 中检查我的 javascript 文件,我想
当我发现 optional chaining 时,我正在编写一些 Javascript。 (?.)。我决定在我正在编写的一些代码中需要它。当我完成输入代码时,我注意到 JSHint 给了我一个错误,指
在 sublime text 上,我在尝试验证 JS 时遇到以下错误。 [Errno 2] No such file or directory: 'jshint' [cmd: ['jshint', '
在这种情况下解决 JSHint 错误的正确方法是什么?删除 function(i) 可以解决这个问题吗?这样会影响性能吗? for (var i = 0; i + 1 避免警告的一种方法是使用 se
在注释中使用“不安全字符”(例如变音符)时,出现以下错误: This character may get silently deleted by one or more browsers. 有什么方法
使用Gulp时,如何从JSHint获得输出以显示在Visual Studio 2015的错误列表中,而不是仅输出到任务运行器? 我尝试了this package,但是除了格式化Gulp输出的格式略有不
我正在尝试创建一个服务器端 git pre-receive Hook 来检查 php 和 javascript 文件的代码质量。因此,如果预接收钩子(Hook)测试失败,repo 服务器将使 git
我是一名优秀的程序员,十分优秀!