Reputation: 1
I have a problem with eslint and prettier in my react-native app when opened in visual studio code. See the picture. What am I doing wrong?
Upvotes: 0
Views: 344
Reputation: 160
You do nothing wrong. It's your ESlint that keeps your code clean, as follows:
{Fragment}
→ { Fragment }
'react'
→ "react"
and 'react-native'
→ "react-native"
And StatusBar
is the last element of the object so there shouldn't be a comma next to it.
Note: you should set up Prettier so that it can automatically correct your code in accordance to ESlint format rules.
Upvotes: 1