How to disable prettier in VSCode for a specific project? - visual-studio-code

I need to turn off Prettier for a specific project. In order to do that I have created a .prettierrc with {} but it is not working.
I can deactivate the prettier plugin on vscode, since we have other projects, need to have that in the plugin list.
I also use ESLint in the project.

Just create a .prettierignore file in the project with **
The entire codebase will be ignored for Prettier plugin.

You can also disable the extension for your current workspace.
Go to your extensions and hit the gear icon on Prettier, then select "Disable (Workspace)"

Related

Configuring Stylelint for VSCode Globally

Here's what I want to achieve: I want to configure the extension so that it checks and fixes automatically any errors in any .scss file that I create.
I don't want to install the packages manually for every project that I create.
Here's what I've done so far:
Installed StyleLint Extension
Disabled VS Code's Built-In Linters
Installed the following packages globally:
Postcss
Postcss-scss
stylelint
stylelint-config-recess-order
stylelint-order
Enabled SCSS validation
Added path to postcss syntax
Any advice on what to do next?

Is it possible to enable and disable extensions for certain workspace with .vscode

I added some extensions to vscode, including python, c++, flutter, etc. I'm trying to disable some extensions in a specific repo, such as the flutter extension in my frontend repo. I want to save this setting in .vscode so that when I move the repo, vscode will remember the setting.
In order to enable and disable the extensions for a certain workspace in visual studio code.
Go to the extensions on the sidebar and disable/enable for the current workspace. Adding screenshot.
To do this step by step:
On the Extensions sidebar.
Select the extension, then select the 'Disable' button. This will disable the extension for all workspace.
Then select "Enable (workspace)" to enable it for the current workspace.

Why doesn't emmet.extensionsPath default to the .vscode/ folder?

I have just started customizing my VS Code project with some project specific emmet snippets (by adding a snipptest.json into the project).
It is possible to just configure "emmet.extensionsPath": [".vscode/"], which will make the snippets file be found for every project.
No I ask myself: Why do I need to manually add the .vscode folder to the emmet search path?
Is there a potential problem with that configuration I don't see? OR other reasons I shouldn't do this?
And if this is totally valid, why isn't this the default behaviour?

Why do I still need to install prettier to each individual project while it has already been installed as an extension in vs code?

I am confused with how the extensions in VS Code work. The "Prettier - Code formatter" extension (by Esben Petersen) is already installed as an extension in my VS Code. My question is why I still need to run npm install prettier --save-dev in each individual project? Isn't it true that the extensions are already applied to all files?
You don't?
Should prettier not be installed locally with your project's dependencies or globally on the machine, the version of prettier that is bundled with the extension will be used.
https://github.com/prettier/prettier-vscode#prettier-resolution
It seems like you want Prettier to be your code formatter in VS Code for all of your projects.
In VS Code navigate to:
File > Preferences > Settings
Search for "Default formatter"
And then select "esbenp.prettier-vscode"

Disable Auto Generation of .vscode Folder

I often like to use VSCode to quick view some projects to pull snippets from them. However, this leads to a ton of additional .vscode folders being placed on my drive in any folder I use the right-click -> Open with VSCode option.
Is there a way to disable this folder from being created every time vscode loads somewhere new?
This issue was due to the 'C/C++ for Visual Studio Code' extension being outdated.
Upgrading to the latest version of this extension has fixed the problem.
That is not the standard behaviour of VSCode, normally the .vscode only gets generated once there is something like a launch.json put into it. Mind checking what's actually in there?