next.js icon indicating copy to clipboard operation
next.js copied to clipboard

Running the dev server is overwriting my vscode settings file, and updating my .gitignore

Open sandervspl opened this issue 2 years ago • 1 comments

Verify canary release

  • [X] I verified that the issue exists in the latest Next.js canary release

Provide environment information

Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 21.6.0: Wed Aug 10 14:28:23 PDT 2022; root:xnu-8020.141.5~2/RELEASE_ARM64_T6000 Binaries: Node: 16.14.0 npm: 8.3.1 Yarn: 1.22.19 pnpm: 7.13.4 Relevant packages: next: 12.3.2-canary.43 eslint-config-next: 13.0.0 react: 18.2.0 react-dom: 18.2.0

What browser are you using? (if relevant)

Chrome

How are you deploying your application? (if relevant)

N/A

Describe the Bug

I have a settings.json file in my project's .vscode folder. It has some settings in there that I need for my project. However, running next dev wipes this file and replaces it with some kind of TypeScript settings.

Before

{
  "css.customData": [".vscode/css.json"],
  "editor.formatOnSave": true,
  "editor.defaultFormatter": "esbenp.prettier-vscode"
}

After

{
-  "css.customData": [".vscode/css.json"],
-  "editor.formatOnSave": true,
-  "editor.defaultFormatter": "esbenp.prettier-vscode",
+  "typescript.tsdk": "./node_modules/typescript/lib",
+  "typescript.enablePromptUseWorkspaceTsdk": true
}

Also, I want to push this folder to git. Currently my .gitignore keeps being updated with a new .vscode line added to it, which I don't want.

This bug appears to exist in both the latest canary release and 13.0.0

Expected Behavior

Don't remove my settings. Add the lines to the existing JSON file instead of overwriting the file. Also, don't force me to ignore the .vscode folder if I DO want to add it to git.

Link to reproduction

N/A

To Reproduce

  1. Create a .vscode folder
  2. Add a settings.json file to that folder
  3. Add any JSON
  4. Run next dev

sandervspl avatar Oct 25 '22 21:10 sandervspl

The same issue here, DON'T override my .vscode/settings.json and .gitignore.

laozhu avatar Oct 29 '22 00:10 laozhu

The .gitignore is not updating anymore, but it seems this didn't fix adding the .vscode folder. Especially for those who don't use vscode, it just adds an unnecessary folder

HaoboZ avatar Oct 30 '22 16:10 HaoboZ

This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

github-actions[bot] avatar Nov 30 '22 00:11 github-actions[bot]