我试图在React应用程序中做一些更改,但我发现它的编译失败了,并给我这些错误
Expected indentation of 2 spaces but found 4 indent
Line 7:1: Expected indentation of 2 spaces but found 4 indent
Line 8:9: Expected indentation of 6 space characters but found 8 react/jsx-indent
Line 9:13: Expected indentation of 10 space characters but found 12 react/jsx-indent
Line 11:1: Expected indentation of 2 spaces but found 4 indent如果我添加了额外的空格,我甚至会得到一个错误,请分享我如何删除这些限制。
发布于 2020-05-12 06:45:34
两种选择
如果您使用VS代码作为编辑器,那么只需运行文档格式命令,如
option+shift+F [for mac]
用于windows的alt+shift+F
https://stackoverflow.com/questions/61740606
复制相似问题