Last active
July 1, 2023 22:41
-
-
Save iods/75078fe2cd942b54f7d4257d3170c46e to your computer and use it in GitHub Desktop.
My top level .editorconfig for multiple projects.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This file creates a uniform coding style for different languages and IDEs | |
# Copyright © 2017 - Present, Rye Miller || The Dark Society | |
# Version 0.1 - https://gist.github.com/iods/75078fe2cd942b54f7d4257d3170c46e | |
# 07/01/2023 | |
# @see https://editorconfig.org/ | |
root = true | |
[*] | |
charset = utf-8 | |
end_of_line = lf | |
insert_final_newline = true | |
indent_style = space | |
indent_size = 4 | |
max_line_length = 80 | |
tab_width = indent_size | |
trim_trailing_whitespace = true | |
# https://google.github.io/styleguide/shell.xml#Indentation | |
[*.{bash,sh,zsh}] | |
indent_size = 2 | |
indent_style = space | |
[**.{css,html,js,jsx,json,xml,vim,rb,Rakefile,scss,ts,tsx}] | |
indent_size = 2 | |
indent_style = space | |
[{Dockerfile,Dockerfile.template.erb,Dockerfile-alpine}] | |
indent_style = space | |
indent_size = 4 | |
[*.env] | |
insert_final_newline = false | |
trim_trailing_whitespace = false | |
[{*.go,go.mod,go.sum}] | |
indent_size = 4 | |
indent_style = space | |
[{*.ini, .editorconfig}] | |
indent_size = 4 | |
# https://google.github.io/styleguide/jsguide.html | |
[*.{cjs,js,json,jsx,mjs,ts,tsx}] | |
indent_size = 2 | |
indent_style = space | |
[*.json] | |
indent_size = 4 | |
[*.less] | |
indent_style = space | |
indent_size = 2 | |
[Makefile] | |
indent_size = 4 | |
indent_style = tab | |
[*.{md,mdown,markdown,txt}] | |
indent_size = 4 | |
max_line_length = 0 | |
trim_trailing_whitespace = false | |
[*.min.*] | |
indent_style = ignore | |
trim_trailing_whitespace = false | |
insert_final_newline = ignore | |
[*.{php, twig, tpl}] | |
indent_size = 4 | |
# https://www.python.org/dev/peps/pep-0008/#code-lay-out | |
[*.py] | |
charset = utf-8 | |
indent_style = space | |
indent_size = 4 | |
insert_final_newline = true | |
trim_trailing_whitespace = true | |
[*.scss] | |
indent_style = space | |
indent_size = 2 | |
[*.{xml,xml.dist,xsd}] | |
max_line_length = off | |
end_of_line = lf | |
indent_style = space | |
charset = utf-8 | |
trim_trailing_whitespace = true | |
insert_final_newline = true | |
indent_size = 2 | |
[{*.{yml, yaml}, .eslintrc}] | |
indent_size = 2 | |
indent_style = space |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment