visual-studio-2015 - Visual Studio 2015 JSX/ES2015 语法高亮

标签 visual-studio-2015 intellisense ecmascript-6 react-jsx

如何在带有 ES2015 代码的 JSX 的 Visual Studio 2015 中获得正确的语法突出显示?

ES2015 code

如果我删除 import,它工作正常和 export关键词:
Without import/export

我刚刚更新到 Visual Studio 2015 Enterprise Update 1,但它仍然保持不变。

最佳答案

在已安装的 VS2015 Update-3 和 NTVS 1.2 中,只需将 TypeScript Editor 设置为文件扩展名 jsx 的默认编辑器就可以了。

1) 打开工具>选项>文本编辑器>文件扩展名 .

2) 输入 jsx 在扩展中,选择 typescript 编辑器 作为编辑器,然后单击应用。

enter image description here

关于visual-studio-2015 - Visual Studio 2015 JSX/ES2015 语法高亮,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34097915/

相关文章:

c# - MVC 6 中的 JsonResult 未收到任何响应

c# - 在类库中隐藏仅包含内部类型的 namespace ?

c++ - Intellisense 说错误 : member "Class::field" is inaccessible but it's still works? 为什么?

python - 如何减少 python 导入包的 Visual Studio 代码中的自动完成延迟?

tdd - React Native 中的单元测试触摸事件

debugging - 如何在 Visual Studio 2015 asp.net 5 中调试 Typescript?

visual-studio-2015 - 我的 vs 包没有正确加载

javascript - 构造函数中定义的变量在类方法中不可用

c# - 在 VS2015/C# 中的当前文件/类中查找方法

javascript - 为什么第 27 行在第 24 行之前执行?