Last Updated: April 27, 2024
·
439
· cbabos

Use .editorconfig

One important thing you should know about:
If You working in a team, your codes will be shared in your team.
The most frustrating thing about this, if you don't use the same formatting rules, then your code will be harder to read to your teammate.
The simplest solution is to use a .editorconfig file in your project.
There are some options that you can read about at: http://editorconfig.org/

My .editorconfig file looks like this:
root = true

[*]
indentstyle = space
indent
size = 4
endofline = lf
charset = utf-8
trimtrailingwhitespace = true
insertfinalnewline = true

[*.md]
trimtrailingwhitespace = false
</code>