Skip to content

Commit ee11320

Browse files
committed
fix: yarn PnP compatibility for vscode
1 parent ac0aebe commit ee11320

File tree

6 files changed

+9992
-6757
lines changed

6 files changed

+9992
-6757
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ web_modules/
7171

7272
# Yarn Integrity file
7373
.yarn-integrity
74+
.yarn
7475

7576
# dotenv environment variable files
7677
.env

.vscode/extensions.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"recommendations": [
3+
"arcanis.vscode-zipfs",
4+
"dbaeumer.vscode-eslint",
5+
"esbenp.prettier-vscode"
6+
]
7+
}

.vscode/settings.json

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,31 @@
1616
"prettier.printWidth": 100,
1717
"prettier.semi": false,
1818
"search.exclude": {
19-
"**/dist": true
19+
"**/dist": true,
20+
"**/.yarn": true,
21+
"**/.pnp.*": true
2022
},
2123
"files.exclude": {
2224
"**/.git": true,
25+
"**/.svn": true,
26+
"**/.hg": true,
27+
"**/CVS": true,
2328
"**/.DS_Store": true,
2429
"**/Thumbs.db": true,
25-
"**/node_modules": true,
30+
"**/node_modules": false,
2631
"**/.next": true,
2732
"**/out": true,
2833
"**/.open-next": true
2934
},
3035
"editor.rulers": [100],
31-
"typescript.tsdk": "node_modules/typescript/lib",
36+
"typescript.tsdk": ".yarn/sdks/typescript/lib",
3237
"search.useIgnoreFiles": false,
3338
"explorer.excludeGitIgnore": false,
34-
"editor.stablePeek": false
39+
"editor.stablePeek": false,
40+
"eslint.nodePath": ".yarn/sdks",
41+
"prettier.prettierPath": ".yarn/sdks/prettier/index.js",
42+
"typescript.enablePromptUseWorkspaceTsdk": true,
43+
"[ignore]": {
44+
"editor.defaultFormatter": "foxundermoon.shell-format"
45+
}
3546
}

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ Put below line in `tailwind.config.ts`,
6969

7070
> 💡 **Tip**: You can edit the files in the submodule BUT don't commit and push it. After finishing editing, just `cd notion-x` and then `git checkout <file-path>` to discard all changes.
7171
72+
For Code Editor to work with Yarn's PnP ([Plug'n'Play](https://yarnpkg.com/features/pnp)), follow [this official guide](https://yarnpkg.com/getting-started/editor-sdks#vscode).
73+
7274
## Update something new (for me only)
7375

7476
Read the steps in the repo [dinhanhthi.com](https://github.com/dinhanhthi/dinhanhthi.com).

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
"npm": "^10.0.8",
1212
"node": "^20.10.0"
1313
},
14-
"private": false,
1514
"scripts": {
1615
"reinstall": "rimraf node_modules && rimraf yarn.lock && yarn",
1716
"prettier": "prettier --write \"**/*.{tsx,ts,css,scss}\""

0 commit comments

Comments
 (0)