Skip to content

Instantly share code, notes, and snippets.

@fordarnold
Created May 20, 2020 11:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fordarnold/1e2e54819207f73e7ac9baf6409d0faf to your computer and use it in GitHub Desktop.
Save fordarnold/1e2e54819207f73e7ac9baf6409d0faf to your computer and use it in GitHub Desktop.
Code formatting style - the way I like it
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs.
#
# ~ editorconfig.org
# ----------------------------------------------------------------
# top-most EditorConfig file
root = true
# We recommend you to keep these unchanged.
[*]
charset = utf-8
end_of_line = lf
indent_style = tab
indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true
[package.json]
indent_style = space
indent_size = 2
[*.md]
trim_trailing_whitespace = false
[*.svg]
indent_style = space
tab_width = 2
# Tab indentation (no size specified)
[*.html]
charset = utf-8
indent_style = tab
indent_size = 4
tab_width = 4
# 2 space indentation
[*.{js,py,json}]
indent_style = space
indent_size = 2
[{*.rb, *.yml, *.js.map}]
indent_style = space
indent_size = 2
# Matches the exact files either package.json or .travis.yml
[{package.json,.travis.yml}]
indent_style = space
indent_size = 2
{
"singleQuote": true,
"bracketSpacing": true,
"endOfLine": "auto",
"trailingComma": "all"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment