[英]react-native app in visual studio code + eslint + prettier
I have a problem with eslint and prettier in my react-native app when opened in visual studio code. 在Visual Studio代码中打开我的react-native应用程序时,我在eslint和漂亮方面存在问题。 See the picture.
看图片。 What am I doing wrong?
我究竟做错了什么?
You do nothing wrong. 你什么都没做。 It's your ESlint that keeps your code clean, as follows:
是您的ESlint使您的代码保持干净,如下所示:
{Fragment}
→ { Fragment }
{Fragment}
→ { Fragment }
'react'
→ "react"
and 'react-native'
→ "react-native"
'react'
→ "react"
和'react-native'
→ "react-native"
And StatusBar
is the last element of the object so there shouldn't be a comma next to it. 而且
StatusBar
是对象的最后一个元素,因此它旁边不应有逗号。
Note: you should set up Prettier so that it can automatically correct your code in accordance to ESlint format rules. 注意:您应该设置Prettier,以便它可以根据ESlint格式规则自动更正代码。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.