UNPKG

2.23 kBPlain TextView Raw
1# EditorConfig is awesome: http://EditorConfig.org
2
3# https://github.com/jokeyrhyme/standard-editorconfig
4
5# top-most EditorConfig file
6root = true
7
8# Unix-style newlines with a newline ending every file
9[*]
10end_of_line = lf
11insert_final_newline = true
12
13# Set default charset
14[*]
15charset = utf-8
16
17# Other good defaults
18[*]
19indent_size = 2
20indent_style = space
21trim_trailing_whitespace = true
22
23# CSS
24# https://google.github.io/styleguide/htmlcssguide.xml#General_Formatting_Rules
25# http://cssguidelin.es/#syntax-and-formatting
26[*.css]
27indent_size = 2
28indent_style = space
29trim_trailing_whitespace = true
30
31# GNU make
32# https://www.gnu.org/software/make/manual/html_node/Recipe-Syntax.html
33[Makefile]
34indent_style = tab
35
36# Go
37# https://golang.org/cmd/gofmt/
38[*.go]
39indent_style = tab
40
41# HTML
42# https://google.github.io/styleguide/htmlcssguide.xml#General_Formatting_Rules
43[*.{htm,html}]
44indent_size = 2
45indent_style = space
46trim_trailing_whitespace = true
47
48# Java
49# https://google.github.io/styleguide/javaguide.html#s4.2-block-indentation
50[*.java]
51indent_size = 2
52indent_style = space
53
54# JavaScript, JSON, JSX
55# https://github.com/feross/standard
56[*.{js,json,jsx}]
57indent_size = 2
58indent_style = space
59
60# LESS
61# https://github.com/less/less-docs#less-standards
62[*.less]
63indent_size = 2
64indent_style = space
65
66# PHP
67# http://www.php-fig.org/psr/psr-2/
68[*.php]
69indent_size = 4
70indent_style = space
71
72# Python
73# https://www.python.org/dev/peps/pep-0008/#code-lay-out
74[*.py]
75indent_size = 4
76indent_style = space
77
78# Ruby
79# http://www.caliban.org/ruby/rubyguide.shtml#indentation
80[*.rb]
81indent_size = 2
82indent_style = space
83
84# Rust
85# https://github.com/rust-lang/rust/blob/master/src/doc/style/style/whitespace.md
86[*.rs]
87indent_size = 4
88indent_style = space
89insert_final_newline = false
90trim_trailing_whitespace = true
91
92# SASS
93# https://sass-guidelin.es/#syntax--formatting
94[*.{sass,scss}]
95indent_size = 2
96indent_style = space
97
98# TypeScript
99# https://github.com/Microsoft/TypeScript/wiki/Coding-guidelines#style
100# https://github.com/Microsoft/TypeScript/blob/master/.editorconfig
101[*.ts]
102indent_style = space
103indent_size = 4
104
105# YAML
106# http://yaml.org/spec/1.2/2009-07-21/spec.html#id2576668
107[*.{yaml,yml}]
108indent_size = 2
109indent_style = space