generated from germanfrelo/template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.editorconfig
52 lines (44 loc) · 2.36 KB
/
.editorconfig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# https://editorconfig.org
# About EditorConfig & Prettier:
# When using both, since they have some options in common, the best way to avoid conflicts between them is to configure those options only in the .editorconfig file. Prettier will use them instead of its own defaults. More info:
# - https://prettier.io/docs/en/configuration#editorconfig
# - https://joepkockelkorn.com/blog/combining-gitattributes-editorconfig-and-prettier
# ----------------------------------------
# Stop the editor from looking for .editorconfig files in parent directories
root = true
# All files
[*]
charset = utf-8 # 1
end_of_line = lf # 2
insert_final_newline = true # 3
trim_trailing_whitespace = true # 4
indent_style = tab # 5
# Markdown
[*.md]
indent_style = space # 6
indent_size = 2 # 7
trim_trailing_whitespace = false # 8
# YAML
[*.{yaml,yml}] # 9
indent_style = space
indent_size = 2
# ----------------------------------------
# 1. See https://www.w3.org/International/questions/qa-html-encoding-declarations.
# 2. See https://aleksandrhovhannisyan.com/blog/crlf-vs-lf-normalizing-line-endings-in-git.
# 3. See:
# - https://stackoverflow.com/a/729795/10015695.
# - https://unix.stackexchange.com/questions/18743/whats-the-point-in-adding-a-new-line-to-the-end-of-a-file.
# 4. Trailing whitespace has no purpose. Consistent formatting throughout the source code makes it easier to read.
# 5. See:
# - https://gomakethings.com/tabs-are-objectively-better-than-spaces.
# - https://alexandersandberg.com/articles/default-to-tabs-instead-of-spaces-for-an-accessible-first-environment.
# - https://zwyx.dev/blog/indentation-for-accessibility.
# - https://github.com/pointfreeco/swift-composable-architecture/discussions/2340.
# - https://lea.verou.me/blog/2012/01/why-tabs-are-clearly-superior.
# 6. See https://github.com/DavidAnson/markdownlint/blob/main/doc/md010.md.
# 7. See https://github.com/DavidAnson/markdownlint/blob/main/doc/md007.md.
# 8. See:
# - https://www.markdownguide.org/basic-syntax/#line-breaks.
# - https://github.com/DavidAnson/markdownlint/blob/main/doc/md009.md.
# - https://code.visualstudio.com/docs/languages/markdown#_keep-trailing-whitespace-in-order-to-create-line-breaks.
# 9. See https://localheinz.com/articles/2023/02/06/indenting-yaml-files.