IDEA Method definition shorthands are not supported by current JavaScript version

Posted cdfive

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了IDEA Method definition shorthands are not supported by current JavaScript version相关的知识,希望对你有一定的参考价值。

sentinel-dashboard前端用到了AngularJS v1.4.8,在IDEA里修改js,触发js验证时有一些js文件会出现红色波浪线。
在代码行里鼠标一上去提示信息:Method definition shorthands are not supported by current javascript version

虽然不运行工程编译、启动运行,但像java文件有问题一样的红色波浪线看着不清爽。

看描述是JavaScript版本某些定义和写法不支持。

解决方法:

File->Settings->Languages & Frameworks->JavaScript
JavaScript language version选择ECMAScript 6,保存设置等IDEA重新Index即可。


参考:

https://blog.csdn.net/WYpersist/article/details/80509043

以上是关于IDEA Method definition shorthands are not supported by current JavaScript version的主要内容,如果未能解决你的问题,请参考以下文章

解决:Method definition shorthands are not supported

sh avoid_path_definition.sh

[Vue warn]: Method “components“ has type “object“ in the component definition. Did you reference the

rspec 针对元编程的测试

IDEA Cannot resolve method ‘xxx‘问题解决IDEA刷新缓存重启

IDEA Cannot resolve method ‘xxx‘问题解决IDEA刷新缓存重启