Me gusta usar la sangría de mi archivo Javascript en 3 espacios. Pero a Eslint no le gusta esta forma y me da una advertencia de sangría. ¿Cómo debo arreglarlo?
Y cuando trabajamos con el equipo, otros miembros del equipo pueden configurar su editor y formateador de manera diferente. En este caso, ¿cómo debo configurar Eslint? Y también, ¿qué pasa si no quiero que Eslit me dé ningún error de sangría?
error Expected indentation of 2 spaces but found 3 warning Expected indentation of 2 spaces but found 3 spaces warning Expected indentation of 4 spaces but found 6 spaces warning Expected indentation of 4 spaces but found 6 spaces warning Expected indentation of 2 spaces but found 3 spacesAclaración de los comentarios:
"No uso más bonito"
puede usar el siguiente código para configurarlo
"indent": ["error", 4] // Indent with 4 spaces "react/jsx-indent": ["error", 4] // Indent JSX with 4 spaces "react/jsx-indent-props": ["error", 4] // Indent props with 4 spaces