Don't modify eslint path automatically, don't automatically change user settings
See original GitHub issueEvery time I open VSCode this extension automatically adds "eslint.nodePath": "/Users/myuser/.vscode/extensions/salesforce.salesforcedx-vscode-lwc-45.15.1/node_modules"
to my settings.json
file.
Please stop auto modifying config files, this affects any VSCode session I open regardless of it’s a Salesforce project. It happens without prompting. Your extensions have already fully deleted my local config settings in the past from trying to do things like this. Now you’re auto modifying them? Please don’t add behavior like this to plugins!
This breaks any project with custom ESLint plugins, because it tries to use a randomly installed one in the sfdx plugin, not the correct locally installed on per project.
For anyone else who has their config mangled by these bad actor plugins and starts seeing errors like this because it’s using a randomly installed eslint:
[Error - 11:43:40 AM] Cannot find module 'eslint-plugin-prettier' Referenced from: /Users/me/repo/.eslintrc.js
You can block the bad plugin by setting it manually:
"eslint.nodePath": "./node_modules"
Issue Analytics
- State:
- Created 4 years ago
- Reactions:7
- Comments:15 (4 by maintainers)
Top GitHub Comments
yikes
this is a serious issue, please re-open
I am not a happy camper at the moment because the build and deploy is failing due to conflicts caused by jsconfig.json being randomly rewritten. To follow up on my previous post:
paths
property which points each LWC in the tree to itself, more or less?If for some reason there is a need to rewrite jsconfig.json, then a better approach would be to provide a script or SFDX command that creates a new one that people could use when, and only when, they want to.
Appreciate your help.