Skip to content

Instantly share code, notes, and snippets.

@motss
Created November 19, 2017 02:49
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save motss/199ceb253f27904cff41eef75aac2fae to your computer and use it in GitHub Desktop.
Save motss/199ceb253f27904cff41eef75aac2fae to your computer and use it in GitHub Desktop.
.editorconfig + .gitattributes

Config

.editorconfig

# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# http://editorconfig.org

root = true

[*]

# Change these settings to your own preference
indent_style = space
indent_size = 2

# We recommend you to keep these unchanged
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false

.gitattributes

# Automatically normalize line endings for all text-based files
# http://git-scm.com/docs/gitattributes#_end_of_line_conversion
* text=auto

# For the following file types, normalize line endings to LF on
# checkin and prevent conversion to CRLF when they are checked out
# (this is required in order to prevent newline related issues like,
# for example, after the build script is run)
.*      text eol=lf
*.css   text eol=lf
*.html  text eol=lf
*.js    text eol=lf
*.json  text eol=lf
*.scss  text eol=lf
*.md    text eol=lf
*.rs    text eol=lf
*.sh    text eol=lf
*.toml  text eol=lf
*.txt   text eol=lf
*.xml   text eol=lf
*.yaml   text eol=lf
*.yml   text eol=lf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment