forked from gustavopch/tsc-files
-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.editorconfig
36 lines (27 loc) · 1.97 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
# EditorConfig configuration
# See: https://editorconfig.org
# Marks this editorconfig file as the top-most one.
root = true
# Applies to all files and acts as a fallback/default for the other sections.
[*]
indent_style = tab # Use tabs everywhere (they are more flexible than spaces since they can be set to any width you want)
indent_size = tab # Use the `tab_width` setting as the width of the indent
#tab_width = 4 # (This is left out so editor settings are used)
end_of_line = lf # Use Unix line endings (they are the most widely supported and are the default in Git/Prettier)
charset = utf-8 # Use UTF-8 (it's the universal standard)
trim_trailing_whitespace = true # Remove trailing whitespaces (they are a bit annoying most of the time)
insert_final_newline = true # Add a newline at the end of files (it's a good practice and helps when adding new content to a file)
max_line_length = 80 # Force a hard wrap at 80 columns (not supported by all editors but it's a good practice and helps when doing split screen)
# Applies to all files that shouldn't use tabs.
# These are mostly files that are enforced to use spaces in some way (e.g. YAML files always use spaces and PNPM automatically uses spaces in package.json).
[*.{json,yml,yaml,md,mdx}]
indent_style = space # Use spaces instead of tabs for these files
indent_size = 2 # Set the width of the indent to 2 spaces (YAML and PNPM use 2 spaces so it's a good default)
# Applies to all files that shouldn't have a newline at the end.
# This currently only applies to JSON files since they always end with a '}' or ']'.
[*.json]
insert_final_newline = false # Don't add a newline at the end of these files
# Applies to all files that should keep trailing whitespaces.
# This currently only applies to Markdown files since 2 spaces are used there to force a line break.
[*.{md,mdx}]
trim_trailing_whitespace = false # Don't remove trailing whitespaces in these files