Skip to content

Commit 5d8737d

Browse files
authored
chore: align editor config and simplify (#7551)
Simplifies and aligns the editor configuration so formatting rules are consistent and editor-agnostic where possible. - Moved spell-check dictionary from .vscode/settings.json to a standalone .cspell.json so it works across all editors, not just VSCode. - Added .vscode/extensions.json recommending the EditorConfig and Code Spell Checker extensions to new contributors. - Simplified .vscode/settings.json by removing contentious per-language formatter overrides and ESLint-as-default-formatter config. - Removed the markdown exception in .editorconfig that disabled trim_trailing_whitespace for *.md files, making the rules uniform across all file types. Motivation - Align VSCode editor config with .editorconfig file (VSCode users don't automatically load this file without a custom plugin) - Remove contentious entries from VSCode config
1 parent afa3606 commit 5d8737d

4 files changed

Lines changed: 34 additions & 37 deletions

File tree

.cspell.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json",
3+
"version": "0.2",
4+
"language": "en",
5+
"words": [
6+
"aerospike",
7+
"appsec",
8+
"backportability",
9+
"ddsource",
10+
"kafkajs",
11+
"llmobs",
12+
"microbenchmarks",
13+
"oracledb",
14+
"rabbitmq",
15+
"rspack",
16+
"sirun"
17+
]
18+
}

.editorconfig

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,3 @@ end_of_line = lf
99
charset = utf-8
1010
trim_trailing_whitespace = true
1111
insert_final_newline = true
12-
13-
[*.md]
14-
trim_trailing_whitespace = false

.vscode/extensions.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"recommendations": [
3+
"EditorConfig.EditorConfig",
4+
"streetsidesoftware.code-spell-checker"
5+
]
6+
}

.vscode/settings.json

Lines changed: 10 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,16 @@
11
{
2-
// Use the workspace version of TypeScript instead of VSCode's bundled version
3-
"typescript.tsdk": "node_modules/typescript/lib",
2+
// Core VSCode settings
3+
"editor.formatOnSave": true,
4+
"editor.insertSpaces": true,
5+
"editor.tabSize": 2,
6+
"files.eol": "\n",
47
"files.insertFinalNewline": true,
5-
"yaml.schemas": {
6-
"https://json.schemastore.org/github-workflow.json": ".github/workflows/*.yml"
7-
},
8+
"files.trimTrailingWhitespace": true,
89
"typescript.enablePromptUseWorkspaceTsdk": true,
9-
"cSpell.words": [
10-
"aerospike",
11-
"appsec",
12-
"backportability",
13-
"ddsource",
14-
"kafkajs",
15-
"llmobs",
16-
"microbenchmarks",
17-
"oracledb",
18-
"rabbitmq",
19-
"rspack",
20-
"sirun"
21-
],
22-
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
23-
"editor.formatOnSave": true,
10+
"typescript.tsdk": "node_modules/typescript/lib", // Use the workspace version of TypeScript instead of VSCode's bundled version
11+
// Extension settings
2412
"eslint.format.enable": true,
25-
"[javascript]": {
26-
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
27-
"editor.codeActionsOnSave": {
28-
"source.fixAll.eslint": "explicit"
29-
}
30-
},
31-
"[typescript]": {
32-
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
33-
"editor.codeActionsOnSave": {
34-
"source.fixAll.eslint": "explicit"
35-
}
36-
},
37-
"[json]": {
38-
"editor.defaultFormatter": "vscode.json-language-features"
13+
"yaml.schemas": {
14+
"https://json.schemastore.org/github-workflow.json": ".github/workflows/*.yml"
3915
}
4016
}

0 commit comments

Comments
 (0)