Skip to content

Commit fa469b2

Browse files
authored
Merge pull request #9503 from ever-co/chore/editorconfig-prettier-integration
chore: global editorconfig updates
1 parent 95cff1e commit fa469b2

File tree

7 files changed

+275
-266
lines changed

7 files changed

+275
-266
lines changed

.editorconfig

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,39 @@
11
# Editor configuration, see http://editorconfig.org
2+
# This is the root config - stops EditorConfig from looking in parent directories
23
root = true
34

5+
# Default settings for all files
46
[*]
57
charset = utf-8
68
indent_style = tab
79
indent_size = 4
10+
tab_width = 4
11+
end_of_line = lf
812
insert_final_newline = true
913
trim_trailing_whitespace = true
14+
max_line_length = 120
1015

16+
# SCSS/CSS files
17+
[*.{scss,css}]
18+
indent_style = space
19+
indent_size = 2
20+
tab_width = 2
21+
22+
# YAML files - must use spaces (YAML spec)
23+
[*.{yml,yaml}]
24+
indent_style = space
25+
indent_size = 2
26+
tab_width = 2
27+
28+
# Markdown files
1129
[*.md]
1230
max_line_length = off
1331
trim_trailing_whitespace = false
1432

15-
[*.yml]
16-
indent_style = space
33+
# Makefile - must use tabs
34+
[Makefile]
35+
indent_style = tab
36+
37+
# Windows batch files
38+
[*.{cmd,bat}]
39+
end_of_line = crlf

.gitattributes

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
1+
# Auto detect text files and normalize line endings to LF
2+
* text=auto eol=lf
3+
4+
# Windows batch files require CRLF
5+
*.cmd text eol=crlf
6+
*.bat text eol=crlf
7+
18
LICENSE text
2-
Jenkinfile text
9+
Jenkinsfile text
310

411
*.conf text
512
*.js text

.prettierrc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,18 @@
77
"arrowParens": "always",
88
"trailingComma": "none",
99
"quoteProps": "as-needed",
10-
"trimTrailingWhitespace": true,
10+
"endOfLine": "lf",
11+
"proseWrap": "preserve",
1112
"overrides": [
1213
{
13-
"files": "*.scss",
14+
"files": "*.{scss,css}",
1415
"options": {
1516
"useTabs": false,
1617
"tabWidth": 2
1718
}
1819
},
1920
{
20-
"files": "*.yml",
21+
"files": "*.{yml,yaml}",
2122
"options": {
2223
"useTabs": false,
2324
"tabWidth": 2

.vscode/extensions.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
"esbenp.prettier-vscode",
1111
"firsttris.vscode-jest-runner",
1212
"vscode-icons-team.vscode-icons",
13-
"github.copilot"
13+
"github.copilot",
14+
"EditorConfig.EditorConfig",
15+
"stylelint.vscode-stylelint"
1416
]
1517
}

.vscode/settings.json

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,38 @@
11
{
2-
"cSpell.userWords": [],
32
"cSpell.enabled": true,
43
"typescript.tsdk": "node_modules/typescript/lib",
54
"typescript.enablePromptUseWorkspaceTsdk": true,
65
"npm.packageManager": "yarn",
7-
"prettier.trailingComma": "none",
8-
"prettier.singleQuote": true,
96
"editor.formatOnSave": true,
7+
"editor.defaultFormatter": "esbenp.prettier-vscode",
8+
"editor.codeActionsOnSave": {
9+
"source.fixAll": "explicit"
10+
},
11+
"prettier.requireConfig": true,
12+
"prettier.configPath": ".prettierrc",
13+
"prettier.useEditorConfig": true,
1014
"eslint.format.enable": true,
1115
"editor.tabSize": 4,
16+
"editor.insertSpaces": false,
17+
"editor.detectIndentation": false,
18+
"[markdown]": {
19+
"files.trimTrailingWhitespace": false
20+
},
21+
"[css]": {
22+
"editor.insertSpaces": true,
23+
"editor.tabSize": 2
24+
},
25+
"[scss]": {
26+
"editor.insertSpaces": true,
27+
"editor.tabSize": 2
28+
},
29+
"[yaml]": {
30+
"editor.insertSpaces": true,
31+
"editor.tabSize": 2
32+
},
1233
"files.insertFinalNewline": true,
1334
"files.trimFinalNewlines": true,
1435
"files.trimTrailingWhitespace": true,
15-
"editor.codeActionsOnSave": {
16-
"source.fixAll": "explicit"
17-
},
1836
"vsicons.presets.angular": true,
1937
"deepscan.enable": true,
2038
"files.exclude": {

0 commit comments

Comments
 (0)