vscode格式反应性代码和eslint冲突

时间:2019-11-28 09:10:07

标签: reactjs react-native visual-studio-code eslint prettier

创建项目:

react-native init AwesomeProject

代码:

import {createDrawerNavigator} from 'react-navigation';

按:Shift + Alt + F

代码:

import { createDrawerNavigator } from 'react-navigation';

错误消息:

Replace `·createDrawerNavigator·` with `createDrawerNavigator`eslint(prettier/prettier)

我该如何配置?

1 个答案:

答案 0 :(得分:0)

运行ext install esbenp.prettier-vscode