javascript - jshint 验证 es5 错误

标签 javascript macos terminal jshint

通过终端进行 jshint 验证时抛出错误,我有空的 js 文件,但它仍然抛出错误。

f.js: line 0, col 0, ES5 option is now set per defaul
1 error

最佳答案

在主目录中创建 .jshintrc 文件并将 es5 设置为 FALSE。

{
   "es5"           : false,     // true: Allow ES5 syntax (ex: getters and setters)
}

关于javascript - jshint 验证 es5 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28336708/

相关文章:

javascript - Backbonejs 集合更改排序顺序?

javascript - 使用 javascript 添加类无法按预期工作

java - 我可以在 Xcode 中运行 Java 小程序吗?

python - 有上行字符吗? (与\n相反)

在 grep 中使用 Linux 终端命令行变量

javascript - 类型错误 : XX is not a function

javascript - Jest 自定义匹配器

swift - 在 macOS 应用程序中支持 URL 方案

xcode - 如何在 OSX 应用程序的 NStextView 窗口中启用文本的水平滚动?

regex - 为什么 "\b"在查找的正则表达式模式中不起作用?