简体   繁体   English

Visual Studio代码+ eslint +漂亮的react-native应用

[英]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.

相关问题 React-Native 应用程序中的 ESLint / Prettier / Husky 缩进问题 - ESLint / Prettier / Husky indent problems in React-Native app eslint / prettier / eslint-config-react-native-community 与 VS Code 中更漂亮的扩展集成 - eslint / prettier / eslint-config-react-native-community integration with prettier extension in VS Code 视觉工作室代码+ react-native +打字稿:jsx intellisense不起作用 - visual studio code + react-native + typescript: jsx intellisense not working 如何在Visual Studio Code中调试react-native - How to debug react-native in Visual Studio Code 在 react-native 应用程序中禁用 auto-prettier - disable auto-prettier in react-native app visual studio code react-native:当前工作空间不是React Native项目 - visual studio code react-native: Current workspace is not a React Native project 适用于Android的react-native和Visual Studio Emulator - react-native and Visual Studio Emulator for Android 如何删除插入; react-native 中的错误,然后是更漂亮的更漂亮 - How to remove the Insert ; errors in react-native followed by prettier prettier React-native 应用程序离线与 android 工作室 - React-native app offline with android studio React-Native 使用 Visual Studio 代码运行 ios 错误 - React-Native run-ios error w/Visual Studio Code
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM