需要一个标识符,而看到了“>" [英] Expected an identifier and instead saw '>'

查看:75
本文介绍了需要一个标识符,而看到了“>"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

ReactDOM.render(<App />, document.getElementById('root'));

请让我知道为什么VSCode [jshint]会显示该问题?并且也请让我知道如何在.jshintrc

Please let me know why VSCode [jshint] showed that issue? And please also let me know how to add some code inside .jshintrc

推荐答案

JSHint不支持jsx的掉毛.如果要使用jsx开发React应用程序,则应禁用它或最好切换到 ESLint .

JSHint does not support linting of jsx. If you want to develop react applications using jsx you should disable it or better switch to ESLint.

对于Visual Studio代码,您可以安装插件

For Visual Studio Code there is a plugin that you can install.

这篇关于需要一个标识符,而看到了“&gt;"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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