DEV Community

ArturoLG
ArturoLG

Posted on

1

EditorConfig

Esta es la configuración básica que uso para VSCode, el objetivo es formatear el código basado en un estándar, tener un mayor control de las configuraciones del editor y esta reglas tambien las uso en los editores de JetBrains.

root = true
[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
max_line_length = 120
tab_width = 4
[*.css]
indent_size = 2
tab_width = 2
trim_trailing_whitespace = true
max_line_length = 80
[*.md]
trim_trailing_whitespace = false
[*.py]
indent_size = 4
[*.js]
indent_size = 2
[{package.json,.travis.yml}]
indent_size = 2
[*.php]
indent_size = 4
[{*.html,*.jsp,*.gsp}]
indent_size = 2
tab_width = 2
[{*.yaml,*.yml}]
indent_size = 2
[{CHANGELOG.md,README.md}]
indent_size = false
max_line_length = off
view raw .editorconfig hosted with ❤ by GitHub

EditorConfig es compatible con muchos editores de texto y entornos de desarrollo (IDE)

Las reglas de editor config que podemos usar son:

  • indent_style - Define el estilo de la indentación [tab, space]
  • indent_size - Define el tamaño en caracteres de los bloques de indentación [integer_number, tab]
  • tab_width - Establece el tamaño en caracteres del tabulador [integer_number]
  • end_of_line - Se usa para definir el final de línea [lf, crlf, cr]
  • charset - Es la configuración de los caracteres para el archivo [l_atin1, utf-8, utf-16be, utf-16le, utf-8-bom_]
  • trim_trailing_whitespace - Elimina los espacios en blanco al final de las lineas [true, false]
  • insert_final_newline - Agrega una línea en blanco al final del archivo [true, false]
  • max_line_length - Establece el tamaño de caracteres de un línea [integer_number, off]

Hostinger image

Get n8n VPS hosting 3x cheaper than a cloud solution

Get fast, easy, secure n8n VPS hosting from $4.99/mo at Hostinger. Automate any workflow using a pre-installed n8n application and no-code customization.

Start now

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more