Skip to content

Commit b5821e1

Browse files
authored
config: update .editorconfig parameters according to current format of files (EbookFoundation#6696)
* config: addopt current file formatting as yml & markdown parametrization Cherry picked from EbookFoundation#5564: e9f7dff * add config properties for JSON files * extend config to all markdown file extensions * sort global properties * add mapping for python files * add windows batch files mapping * sort mapping entries * add makefile mapping properties * add file description / summary * add poweshell mappings * Comment each section * disable linebreaks on supported editors * Apply some suggestions * clean deadcode - simplify properties already defined in global section - remove not used future patterns
1 parent 5a331c7 commit b5821e1

File tree

1 file changed

+41
-5
lines changed

1 file changed

+41
-5
lines changed

.editorconfig

+41-5
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,49 @@
1+
# EditorConfig helps developers define and maintain consistent
2+
# coding styles between different editors and IDEs
13
# editorconfig.org
4+
5+
; top-most EditorConfig file
26
root = true
37

8+
; define basic and global for any file
49
[*]
5-
indent_style = space
6-
indent_size = 4
7-
end_of_line = lf
810
charset = utf-8
9-
trim_trailing_whitespace = true
11+
end_of_line = lf
12+
indent_size = 4
13+
indent_style = space
1014
insert_final_newline = true
15+
max_line_length = off
16+
trim_trailing_whitespace = true
17+
curly_bracket_next_line = false
18+
spaces_around_operators = true
19+
20+
; DOS/Windows batch scripts -
21+
[*.{bat,cmd}]
22+
end_of_line = crlf
23+
24+
; JavaScript files -
25+
[*.{js,ts}]
26+
curly_bracket_next_line = true
27+
quote_type = single
28+
29+
; JSON files (normal and commented version) -
30+
[*.{json,jsonc}]
31+
indent_size = 2
32+
quote_type = double
1133

12-
[*.md]
34+
; Make - match it own default syntax
35+
[Makefile]
36+
indent_style = tab
37+
38+
; Markdown files - preserve trail spaces that means break line
39+
[*.{md,markdown}]
1340
trim_trailing_whitespace = false
41+
42+
; PowerShell - match defaults for New-ModuleManifest and PSScriptAnalyzer Invoke-Formatter
43+
[*.{ps1,psd1,psm1}]
44+
charset = utf-8-bom
45+
end_of_line = crlf
46+
47+
; YML config files - match it own default syntax
48+
[*.{yaml,yml}]
49+
indent_size = 2

0 commit comments

Comments
 (0)