You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the Salesforce Extensions for VSCode activate, they generate a jsconfig.json file within the lwc directory to support intellisense in Lightning Web Components.
When the file is generated, it includes a key "paths" as a top level property of the configuration object. This is the incorrect place for the key, as it belongs within the compilerOptions object.
See documentation here for more information. Specifically, the "jsConfig options" header describes the correct configuration.
To make the issue worse, this improper configuration is re-applied after removal any time the Salesforce Extensions reload.
Steps To Reproduce:
Generate a new project with the Salesforce CLI command sf project generate
Observe the generated jsconfig.json file within the lwc directory and its improper structure.
Move the key to the compilerOptions object and save the file.
Reload the window from the command palette to force the Salesforce Extensions to reload.
Observe that the erroneous key has been re-added to the configuration.
Expected result
The jsconfig.json file should generate with a valid configuration file. Failing that, it should respect the user's attempts to fix it.
Actual result
The jsconfig.json file generates with an invalid "paths" key and re-adds this key when it is removed.
Additional information
Salesforce Extension Version in VS Code: 60.5.1
SFDX CLI Version: 2.33.3
OS and version: MacOS Sonoma 14.3.1
VS Code version: 1.87.2
Additional note on preferred fix: I would prefer to be able to modify files after generation without worrying about the extensions overriding my changes. I have also run into this problem with .forceignore, which doesn't allow me to the remove .eslint.json entry even though I am using the flat config eslint.config.js file located at the root of the project.
The text was updated successfully, but these errors were encountered:
Summary
When the Salesforce Extensions for VSCode activate, they generate a jsconfig.json file within the lwc directory to support intellisense in Lightning Web Components.
When the file is generated, it includes a key "paths" as a top level property of the configuration object. This is the incorrect place for the key, as it belongs within the compilerOptions object.
See documentation here for more information. Specifically, the "jsConfig options" header describes the correct configuration.
To make the issue worse, this improper configuration is re-applied after removal any time the Salesforce Extensions reload.
Steps To Reproduce:
sf project generate
Expected result
The jsconfig.json file should generate with a valid configuration file. Failing that, it should respect the user's attempts to fix it.
Actual result
The jsconfig.json file generates with an invalid "paths" key and re-adds this key when it is removed.
Additional information
Salesforce Extension Version in VS Code: 60.5.1
SFDX CLI Version: 2.33.3
OS and version: MacOS Sonoma 14.3.1
VS Code version: 1.87.2
Additional note on preferred fix: I would prefer to be able to modify files after generation without worrying about the extensions overriding my changes. I have also run into this problem with .forceignore, which doesn't allow me to the remove .eslint.json entry even though I am using the flat config eslint.config.js file located at the root of the project.
The text was updated successfully, but these errors were encountered: