简体   繁体   English

jshint 'esversion: 6' 问题

[英]jshint 'esversion: 6' issue

I'm having an issue while running the jshint task.我在运行 jshint 任务时遇到问题。 It alerts me to add esversion: 6 to my .jshintrc file.它提醒我将 esversion: 6 添加到我的 .jshintrc 文件中。 I entered it like so:我是这样输入的:

{    
    "esversion": 6    
}    

When that didn't work I tried adding it inline like so:当那不起作用时,我尝试像这样内联添加它:

/*jshint esversion: 6 */    

However, it's still throwing the same error.但是,它仍然抛出相同的错误。 Has anyone else experienced this?有没有其他人经历过这种情况?

{ "esversion": 6 } {“esversion”:6}

is the correct syntax for the .jshintrc file.是 .jshintrc 文件的正确语法。 You probably have the file at the wrong location - it needs to be in the same path the jshint executes from.您可能将文件放在错误的位置 - 它需要在 jshint 执行的同一路径中。

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

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