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?
Related
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)"
I've created a new .d.ts file which will enable autocomplete whenever a particular global object is used in the code.
How do I package this .d.ts file as part of an extension, so that, anyone can install this extension and use the autocomplete/intellisense ?
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"
I have installed the ESLint plugin for Visual Studio Code editor and it shows that it is installed also but still I see the error: No ESLint configuration found for Visual Studio Code at the top of the editor window as shown in the screenshot below:
Can anyone help me to know is there anything that I am missing here.
You are missing .eslintrc.* file. Which can be in different format js, json, yaml... There are two available methods to create configuration file
Manually, just create file and add rules
use init command $ ./node_modules/.bin/eslint --init or eslint --init if you have ESLint installed globally. Then follow instructions and after edit created file to your liking.
More info:
http://eslint.org/docs/user-guide/configuring
https://github.com/eslint/eslint
I recently installed JSHint via Package Manager in Sublime Text 2. As part of my job, I need to edit .coffee files, which JSHint throws all kinds of errors on. I'm unable to identify any preference files or other means of disabling JSHint on these files.
Is it possible to selectively disable JSHint on certain file extensions?
You can create a .jshintignore file at the top level with this in it:
*.coffee