React-native: create new app i am getting this error

Created on 14 Jul 2019  路  6Comments  路  Source: facebook/react-native

React Native version:

Steps To Reproduce

1.
2.

Describe what you expected to happen:

Snack, code example, or link to a repository:

Bug

Most helpful comment

@keshav00001 #25478 solves this problem.

Add .prettierrc file with:

{ bracketSpacing: false, jsxBracketSameLine: true, singleQuote: true, trailingComma: 'all', }

All 6 comments

image

first time App run good but app.js file show warning.
image

Hi @keshav00001,
From the little information you shared about your issue, I understand that you're unhappy that VSCode and ESLint give you warnings/errors regarding the starter code when it comes to running yarn lint.

I believe you have

"@react-native-community/eslint-config": "^0.0.5",

in your devDependencies.

If you revert to version 0.0.4, install your node_modules again, the errors should disappear.

Steps I used to reproduce

npx react-native-cli init MyCoolApp
cd MyCoolApp
yarn lint

Same linting errors were displayed.

"Fix"

yarn add -D @react-native-community/eslint-config@^0.0.4
yarn lint

No errors.


It might be useful to inquire what changed between version 0.0.4 and version 0.0.5 of @react-native-community/eslint-config.

I also experience the same problem. "Fix" above works for me as well

Thanks for response @RobinCsl and @Alexander Pataridze , i was following that way but i was getting the same error. When I eslint uninstall with VsCode then warning is not show.

@keshav00001 #25478 solves this problem.

Add .prettierrc file with:

{ bracketSpacing: false, jsxBracketSameLine: true, singleQuote: true, trailingComma: 'all', }

@keshav00001 #25478 solves this problem.

Add .prettierrc file with:

{
 bracketSpacing: false,
 jsxBracketSameLine: true,
 singleQuote: true,
 trailingComma: 'all',
}

@ecreeth This solved my problem, thanks

Was this page helpful?
0 / 5 - 0 ratings