@dcdavidev/vscode-config 0.0.0-stage → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Davide Di Criscito
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,84 @@
1
- # Temporary Holding Version
1
+ # @dcdavidev/vscode-config
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ <!-- cspell:ignore charliermarsh dbaeumer esbenp joshbolduc tamasfe -->
4
+
5
+ Shareable [VS Code](https://code.visualstudio.com/) settings and extension recommendations for projects that use the spellbook configurations: ESLint, Prettier, CSpell, Commitlint, TypeScript and Turborepo, with Next.js, Rust and Python support.
6
+
7
+ ## Install
8
+
9
+ ```sh
10
+ pnpm add -D @dcdavidev/vscode-config
11
+ ```
12
+
13
+ ## Usage
14
+
15
+ VS Code cannot extend settings from a package, so copy the files into the `.vscode/` folder of your project.
16
+
17
+ On macOS and Linux:
18
+
19
+ ```sh
20
+ mkdir -p .vscode
21
+ cp node_modules/@dcdavidev/vscode-config/settings.json .vscode/settings.json
22
+ cp node_modules/@dcdavidev/vscode-config/extensions.json .vscode/extensions.json
23
+ ```
24
+
25
+ On Windows (PowerShell):
26
+
27
+ ```powershell
28
+ New-Item -ItemType Directory -Force .vscode
29
+ Copy-Item node_modules/@dcdavidev/vscode-config/settings.json .vscode/settings.json
30
+ Copy-Item node_modules/@dcdavidev/vscode-config/extensions.json .vscode/extensions.json
31
+ ```
32
+
33
+ Then reopen the project. VS Code offers to install the recommended extensions, and asks whether to use the TypeScript version of the workspace: choose **Allow**.
34
+
35
+ The copied files are yours: change them as your project needs. Copy them again to get the changes of a new version of the package.
36
+
37
+ ## Extensions
38
+
39
+ `extensions.json` recommends:
40
+
41
+ | Extension | Used for |
42
+ | --------------------------------------- | ----------------------------------------------------- |
43
+ | `charliermarsh.ruff` | Python linting and formatting with Ruff. |
44
+ | `dbaeumer.vscode-eslint` | ESLint problems and fixes. |
45
+ | `editorconfig.editorconfig` | `.editorconfig` settings. |
46
+ | `esbenp.prettier-vscode` | Formatting with Prettier. |
47
+ | `github.vscode-github-actions` | GitHub Actions workflows. |
48
+ | `joshbolduc.commitlint` | Commit message checks in Source Control. |
49
+ | `ms-python.python` | Python language support (with Pylance). |
50
+ | `redhat.vscode-yaml` | YAML files. |
51
+ | `rust-lang.rust-analyzer` | Rust language support, formatting and Clippy. |
52
+ | `streetsidesoftware.code-spell-checker` | Spell checking with CSpell. |
53
+ | `tamasfe.even-better-toml` | TOML files such as `Cargo.toml` and `pyproject.toml`. |
54
+ | `vercel.turbo` | Turborepo tasks and `turbo.json` completion. |
55
+
56
+ ## Settings
57
+
58
+ `settings.json` sets up:
59
+
60
+ - **Editor:** 2-space indentation, LF line endings, UTF-8, a final newline and no trailing whitespace, as in `.editorconfig`, with rulers at 80 (the Prettier print width), 88 (the Ruff line length) and 100 characters.
61
+ - **Prettier:** the default formatter for every language, format on save, and only when the project has a Prettier configuration. Shell, TOML, XML and `.editorconfig` files are formatted too, with the Prettier plugins.
62
+ - **ESLint:** automatic fixes on save, ESLint for JavaScript, TypeScript, JSON, JSONC, Markdown, CSS and shell files, and the right `eslint.config.*` for each package of a monorepo (`eslint.workingDirectories`). TypeScript does not organize imports on save, so that it does not undo the ESLint import order.
63
+ - **TypeScript:** the TypeScript version installed in the project (`node_modules/typescript`) instead of the one bundled with VS Code. Auto-imports use the `.js` extension (needed by `NodeNext` modules), single quotes and `import type` for types, and imports are updated when you move a file.
64
+ - **CSpell:** spell checking with the project `cspell.config.mjs`.
65
+ - **pnpm:** the package manager for the npm scripts view.
66
+ - **Git:** the commit message box warns when the subject is longer than 72 characters or a line is longer than 100, the Commitlint limits.
67
+ - **Markdown:** word wrap, and trailing spaces are kept, because two trailing spaces make a line break.
68
+ - **Rust:** rust-analyzer formats Rust files with rustfmt (4 spaces, a ruler at 100 characters) and checks them with Clippy.
69
+ - **Python:** Ruff formats Python files (4 spaces, a ruler at 88 characters), and fixes problems and sorts imports when you save. Pylance checks types in `standard` mode.
70
+ - **TOML:** Prettier formats `Cargo.toml`, `pyproject.toml` and other TOML files, as the command line does, with a ruler at 100 characters, the TOML print width of `@dcdavidev/prettier-config`.
71
+ - **Next.js:** editor tabs of App Router files that share a name show their route, for example `blog/[slug] (page)` instead of `page.tsx`. `next-env.d.ts` is nested under `next.config.*`. The `next` TypeScript plugin, turned on by the `nextjs.json` preset of `@dcdavidev/typescript-config`, works because the workspace TypeScript version is used.
72
+ - **Explorer:** related files are nested under `package.json`, `README.md`, `tsconfig.json`, `Cargo.toml` and `pyproject.toml`, and Python bytecode caches are hidden.
73
+ - **Search and file watching:** `node_modules`, `.turbo`, `dist`, `.next`, `.vercel`, Rust `target` folders, Python virtual environments and caches, lock files and build info files are left out, which keeps VS Code fast in a monorepo.
74
+
75
+ The settings expect a `cspell.config.mjs` in the project root. Change `cSpell.import` if your CSpell configuration has another name.
76
+
77
+ ## License
78
+
79
+ This project is open-source software licensed under the [MIT License](https://github.com/dcdavidev/spellbook/blob/main/LICENSE).
80
+
81
+ - **Author & Creator**: [Davide Di Criscito](https://github.com/dcdavidev)
82
+ - **Copyright**: © 2026 Davide Di Criscito and contributors.
83
+
84
+ For full license details and permissions, see the [LICENSE](https://github.com/dcdavidev/spellbook/blob/main/LICENSE) file.
@@ -0,0 +1,16 @@
1
+ {
2
+ "recommendations": [
3
+ "charliermarsh.ruff",
4
+ "dbaeumer.vscode-eslint",
5
+ "editorconfig.editorconfig",
6
+ "esbenp.prettier-vscode",
7
+ "github.vscode-github-actions",
8
+ "joshbolduc.commitlint",
9
+ "ms-python.python",
10
+ "redhat.vscode-yaml",
11
+ "rust-lang.rust-analyzer",
12
+ "streetsidesoftware.code-spell-checker",
13
+ "tamasfe.even-better-toml",
14
+ "vercel.turbo"
15
+ ]
16
+ }
package/package.json CHANGED
@@ -1,6 +1,41 @@
1
1
  {
2
2
  "name": "@dcdavidev/vscode-config",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.3.1",
4
+ "private": false,
5
+ "description": "Shareable VS Code settings and extension recommendations for the spellbook configs",
6
+ "keywords": [
7
+ "vscode",
8
+ "settings",
9
+ "extensions",
10
+ "configuration"
11
+ ],
12
+ "homepage": "https://github.com/dcdavidev/spellbook#readme",
13
+ "bugs": {
14
+ "url": "https://github.com/dcdavidev/spellbook/issues"
15
+ },
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "git+https://github.com/dcdavidev/spellbook.git",
19
+ "directory": "packages/vscode-config"
20
+ },
21
+ "license": "MIT",
22
+ "author": {
23
+ "name": "Davide Di Criscito",
24
+ "email": "info@dcdavidev.me",
25
+ "url": "https://dcdavidev.me"
26
+ },
27
+ "exports": {
28
+ "./package.json": "./package.json",
29
+ "./extensions.json": "./extensions.json",
30
+ "./settings.json": "./settings.json"
31
+ },
32
+ "files": [
33
+ "LICENSE",
34
+ "extensions.json",
35
+ "settings.json"
36
+ ],
37
+ "publishConfig": {
38
+ "access": "public"
39
+ },
40
+ "scripts": {}
6
41
  }
package/settings.json ADDED
@@ -0,0 +1,203 @@
1
+ {
2
+ // Editor (matches .editorconfig and the Prettier config)
3
+ "editor.tabSize": 2,
4
+ "editor.insertSpaces": true,
5
+ "editor.detectIndentation": false,
6
+ "editor.rulers": [80, 88, 100],
7
+ "files.eol": "\n",
8
+ "files.encoding": "utf8",
9
+ "files.insertFinalNewline": true,
10
+ "files.trimFinalNewlines": true,
11
+ "files.trimTrailingWhitespace": true,
12
+
13
+ // Formatter (Prettier)
14
+ "editor.defaultFormatter": "esbenp.prettier-vscode",
15
+ "editor.formatOnSave": true,
16
+ "editor.formatOnSaveMode": "file",
17
+ "prettier.requireConfig": true,
18
+ // Formats the files of the Prettier plugins (shell, TOML, XML, INI) too
19
+ "prettier.documentSelectors": [
20
+ "**/.editorconfig",
21
+ "**/*.sh",
22
+ "**/*.bash",
23
+ "**/*.toml",
24
+ "**/*.xml",
25
+ "**/*.svg"
26
+ ],
27
+
28
+ // ESLint & Auto-fix on Save
29
+ "editor.codeActionsOnSave": {
30
+ "source.fixAll.eslint": "explicit",
31
+ // Imports are sorted by ESLint (simple-import-sort), not by TypeScript
32
+ "source.organizeImports": "never"
33
+ },
34
+ "eslint.validate": [
35
+ "javascript",
36
+ "javascriptreact",
37
+ "typescript",
38
+ "typescriptreact",
39
+ "json",
40
+ "jsonc",
41
+ "markdown",
42
+ "css",
43
+ "shellscript"
44
+ ],
45
+ // Monorepo / Turborepo: automatically resolves configuration paths for each workspace package
46
+ "eslint.workingDirectories": [{ "mode": "auto" }],
47
+
48
+ // JavaScript & TypeScript (js/ts.*)
49
+ "js/ts.tsdk.path": "node_modules/typescript/lib",
50
+ "js/ts.tsdk.promptToUseWorkspaceVersion": true,
51
+ "js/ts.preferences.includePackageJsonAutoImports": "auto",
52
+ "js/ts.suggest.autoImports": true,
53
+ // NodeNext modules: relative imports need the `.js` extension
54
+ "js/ts.preferences.importModuleSpecifierEnding": "js",
55
+ "js/ts.preferences.importModuleSpecifier": "shortest",
56
+ "js/ts.preferences.preferTypeOnlyAutoImports": true,
57
+ "js/ts.preferences.quoteStyle": "single",
58
+ "js/ts.updateImportsOnFileMove.enabled": "always",
59
+
60
+ // CSpell
61
+ "cSpell.enabled": true,
62
+ "cSpell.import": ["${workspaceFolder}/cspell.config.mjs"],
63
+
64
+ // Package manager
65
+ "npm.packageManager": "pnpm",
66
+
67
+ // Git
68
+ "git.inputValidation": true,
69
+ "git.inputValidationSubjectLength": 72,
70
+ "git.inputValidationLength": 100,
71
+
72
+ // Language Specific Formatters
73
+ "[typescript]": {
74
+ "editor.defaultFormatter": "esbenp.prettier-vscode"
75
+ },
76
+ "[typescriptreact]": {
77
+ "editor.defaultFormatter": "esbenp.prettier-vscode"
78
+ },
79
+ "[javascript]": {
80
+ "editor.defaultFormatter": "esbenp.prettier-vscode"
81
+ },
82
+ "[javascriptreact]": {
83
+ "editor.defaultFormatter": "esbenp.prettier-vscode"
84
+ },
85
+ "[json]": {
86
+ "editor.defaultFormatter": "esbenp.prettier-vscode"
87
+ },
88
+ "[jsonc]": {
89
+ "editor.defaultFormatter": "esbenp.prettier-vscode"
90
+ },
91
+ "[css]": {
92
+ "editor.defaultFormatter": "esbenp.prettier-vscode"
93
+ },
94
+ "[yaml]": {
95
+ "editor.defaultFormatter": "esbenp.prettier-vscode"
96
+ },
97
+ "[markdown]": {
98
+ "editor.defaultFormatter": "esbenp.prettier-vscode",
99
+ "editor.wordWrap": "on",
100
+ // Two trailing spaces are a line break in Markdown (see .editorconfig)
101
+ "files.trimTrailingWhitespace": false
102
+ },
103
+ "[shellscript]": {
104
+ "editor.defaultFormatter": "esbenp.prettier-vscode"
105
+ },
106
+
107
+ // Rust (rust-analyzer formats with rustfmt: 4 spaces, 100 columns)
108
+ "[rust]": {
109
+ "editor.defaultFormatter": "rust-lang.rust-analyzer",
110
+ "editor.tabSize": 4,
111
+ "editor.rulers": [100]
112
+ },
113
+ "rust-analyzer.check.command": "clippy",
114
+
115
+ // Python (Ruff formats and lints: 4 spaces, 88 columns)
116
+ "[python]": {
117
+ "editor.defaultFormatter": "charliermarsh.ruff",
118
+ "editor.tabSize": 4,
119
+ "editor.rulers": [88],
120
+ "editor.codeActionsOnSave": {
121
+ "source.fixAll.ruff": "explicit",
122
+ "source.organizeImports.ruff": "explicit"
123
+ }
124
+ },
125
+ "python.analysis.typeCheckingMode": "standard",
126
+
127
+ // TOML (Cargo.toml, pyproject.toml): formatted by Prettier, like the CLI,
128
+ // with the 100 print width of the prettier-config TOML override
129
+ "[toml]": {
130
+ "editor.defaultFormatter": "esbenp.prettier-vscode",
131
+ "editor.rulers": [100]
132
+ },
133
+
134
+ // Next.js
135
+ // The `next` TypeScript plugin (typescript-config nextjs.json) runs only with
136
+ // the workspace TypeScript version set in `js/ts.tsdk.path` above.
137
+ // Tab labels for App Router files that share a name, e.g. `blog/[slug] (page)`
138
+ "workbench.editor.customLabels.enabled": true,
139
+ "workbench.editor.customLabels.patterns": {
140
+ "**/app/**/page.{js,jsx,ts,tsx}": "${dirname(1)}/${dirname} (page)",
141
+ "**/app/**/layout.{js,jsx,ts,tsx}": "${dirname(1)}/${dirname} (layout)",
142
+ "**/app/**/template.{js,jsx,ts,tsx}": "${dirname(1)}/${dirname} (template)",
143
+ "**/app/**/loading.{js,jsx,ts,tsx}": "${dirname(1)}/${dirname} (loading)",
144
+ "**/app/**/error.{js,jsx,ts,tsx}": "${dirname(1)}/${dirname} (error)",
145
+ "**/app/**/not-found.{js,jsx,ts,tsx}": "${dirname(1)}/${dirname} (not-found)",
146
+ "**/app/**/default.{js,jsx,ts,tsx}": "${dirname(1)}/${dirname} (default)",
147
+ "**/app/**/route.{js,ts}": "${dirname(1)}/${dirname} (route)"
148
+ },
149
+
150
+ // File associations
151
+ "files.associations": {
152
+ ".czrc": "json"
153
+ },
154
+
155
+ // Explorer: nest generated and related files under their source file
156
+ "explorer.fileNesting.enabled": true,
157
+ "explorer.fileNesting.expand": false,
158
+ "explorer.fileNesting.patterns": {
159
+ "package.json": "pnpm-lock.yaml, pnpm-workspace.yaml, .npmrc, .nvmrc, turbo.json",
160
+ "README.md": "LICENSE, AGENTS.md, CLAUDE.md",
161
+ "tsconfig.json": "tsconfig.*.json",
162
+ "next.config.*": "next-env.d.ts",
163
+ "Cargo.toml": "Cargo.lock, rust-toolchain.toml, rustfmt.toml, clippy.toml",
164
+ "pyproject.toml": "uv.lock, poetry.lock, requirements*.txt, .python-version"
165
+ },
166
+
167
+ // Hide Python bytecode caches
168
+ "files.exclude": {
169
+ "**/__pycache__": true,
170
+ "**/*.pyc": true
171
+ },
172
+
173
+ // Monorepo optimizations & Turborepo exclusions (Search / Watcher)
174
+ "search.exclude": {
175
+ "**/node_modules": true,
176
+ "**/.turbo": true,
177
+ "**/dist": true,
178
+ "**/.next": true,
179
+ "**/.vercel": true,
180
+ "**/pnpm-lock.yaml": true,
181
+ "**/*.tsbuildinfo": true,
182
+ "**/target": true,
183
+ "**/Cargo.lock": true,
184
+ "**/.venv": true,
185
+ "**/.mypy_cache": true,
186
+ "**/.pytest_cache": true,
187
+ "**/.ruff_cache": true
188
+ },
189
+ "files.watcherExclude": {
190
+ "**/.git/objects/**": true,
191
+ "**/.git/subtree-cache/**": true,
192
+ "**/.turbo/**": true,
193
+ "**/node_modules/**": true,
194
+ "**/dist/**": true,
195
+ "**/.next/**": true,
196
+ "**/target/**": true,
197
+ "**/.venv/**": true,
198
+ "**/__pycache__/**": true,
199
+ "**/.mypy_cache/**": true,
200
+ "**/.pytest_cache/**": true,
201
+ "**/.ruff_cache/**": true
202
+ }
203
+ }