EcmaScript 6 - 用于Eclipse验证错误的Tern IDE [英] EcmaScript 6 - Tern IDE for Eclipse validation errors

查看:435
本文介绍了EcmaScript 6 - 用于Eclipse验证错误的Tern IDE的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Eclipse Mars与版本1.1.0(快照)上的Tern IDEfürES6支持。我在箭头函数和常量导出中得到验证错误,可以在这个截图中看到:





我通过这些描述,但是错误不会消失:
https://github.com/angelozerr/tern.java/wiki/Tern-&-ECMAScript6-support
https://github.com/angelozerr/tern.java/wiki/Tern-Linter



我不知道Tern插件真正支持什么,但根据 http://ternjs.net/ Tern应该支持箭头函数0.14。 github上的IDE页面只提及类,导入和承诺支持(这在我的眼中超出了基本的插件来支持ES6)。有没有人正在使用Eclipse(或多或少)完整的功能支持来开发ES6的ES6?我有点像独角兽...

解决方案

你的错误来自不支持ES6语法的JSDT验证器从tern)。



tern 1.1.0-SNAPSHOT提供对ES6的完成,超链接,验证但不是ES6验证的支持。短信 https://github.com/angelozerr/tern.java/wiki/Tern -Linter 是一种类型检查器验证器,而不是语法验证器。



要使用Eclipse IDE& tern.java,您必须:




I am using Eclipse Mars with the Tern IDE für ES6 support on version 1.1.0 (the snapshot). I get validation errors on arrow functions and const-exports as can be seen in this screenshot:

I worked through these descriptions but the errors won't vanish: https://github.com/angelozerr/tern.java/wiki/Tern-&-ECMAScript6-support https://github.com/angelozerr/tern.java/wiki/Tern-Linter

I don't know however whats really supported by the Tern plugin, but according to the documentation on http://ternjs.net/ Tern should support arrow functions since 0.14. The IDE-page on github however only mentions class, import and promise support (which is beyond basic in my eyes for a plugin to support ES6).

Is there anyone who is developing ES6 with Eclipse with (more or less) full feature support? I kinda feel like a unicorn...

解决方案

Your error comes from JSDT Validator which doesn't support ES6 syntax (and not from tern).

tern 1.1.0-SNAPSHOT provides support for ES6 for completion, hyperlink, validation but not for ES6 validation. The linter https://github.com/angelozerr/tern.java/wiki/Tern-Linter is a type checker validator and not a syntax validator.

To validate ES6 with Eclipse IDE & tern.java, you must:

这篇关于EcmaScript 6 - 用于Eclipse验证错误的Tern IDE的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆