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
Related
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?
I'm practising clean code and I installed sonarlint as a static testing tool to help me write clean code. after installing the editor rises this notification
SonarLint is unable to analyze C and C++ file(s) because there is no configured compilation
database.
after some searching, I found that I should add a file with a name
compile_commands.json.
this file should be exported automatically by cmake after adding this option
CMAKE_EXPORT_COMPILE_COMMANDS
where can I add this option in VScode.
this link is where the vscode redirected me to creat the required .json file
I am assuming that you are using CMake for your build. If that is the case then add the following line to the CMakeLists.txt
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
Then build the project and the database will be created for you.
Is there any way using which we can force Visual Studio Code Marketplace extension to use our own configuration file instead of their own default .config file upon installation?
I really want to use my own configuration file for a particular something.
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 am using FIle Utils plugin (https://marketplace.visualstudio.com/items?itemName=sleistner.vscode-fileutils) for Visual Studio Code.
When I try to >File Duplicate, Visual Code says "command 'fileutils.duplicateFile' not found".
I uninstall the plugin then re-install it, does not work.
I closed Visual Code, restarted mac, clear Visual Clear Editor History.
I still can not use the plugin to duplicate file or rename file.
Update VSCode to the latest version will fix the issue. I posted in File Utils github issue
For me following worked
Uninstall extension
Close VSCode
Open VSCode and install extension
Should start working