- changed status to open
Salesforce have launched a new tool for validating the structure and styling of LWCs (as part of the introduction of SLDS 2).
Rather than having to use both VS Code and IC2, it would be better for IC2 to include this feature.
Salesforce have launched a new tool for validating the structure and styling of LWCs (as part of the introduction of SLDS 2).
Rather than having to use both VS Code and IC2, it would be better for IC2 to include this feature.
Investigated this a bit today as I started into the Spring ‘25 updates for IC. The bad news is that SLDS Validator is written as a VS Code extension and not a Salesforce CLI command. The good news, though, is that the VS Code extension is really just a layer atop a language server, and I was therefore able to quickly prototype an integration into JetBrains' IDEs using LSP4IJ:
Here it is in action (with one LSP4IJ bug fixed locally):
I’ll also look at integrating installation and configuration of LSP4IJ and the SLDS Validator language server as seamless as possible similar to what I’ve already done with LSP4IJ for JavaScript/TypeScript/CSS dev in JetBrains' free Community Edition IDEs.
FYI, I should be releasing this integration on Monday along with the last bits of the Spring ‘25 update. Note, however, that there are multiple issues in the SLDS Validator language server that I’ve reported here:
sldsValidatorAllow doesn't seem to resume static code analysis properly. I suggest just using sldsValidatorIgnoreNextLine until this is fixed.As a result, this will be considered a beta-level integration until those issues – at least the most egregious of them – are fixed.
Delivered in 2.3.4.8. Note that it is considered beta-level at present due to known issues in the SLDS Validator. Please see the release notes for issue details.
Investigated this a bit today as I started into the Spring ‘25 updates for IC. The bad news is that SLDS Validator is written as a VS Code extension and not a Salesforce CLI command. The good news, though, is that the VS Code extension is really just a layer atop a language server, and I was therefore able to quickly prototype an integration into JetBrains' IDEs using LSP4IJ:
Here it is in action (with one LSP4IJ bug fixed locally):
I’ll also look at integrating installation and configuration of LSP4IJ and the SLDS Validator language server as seamless as possible similar to what I’ve already done with LSP4IJ for JavaScript/TypeScript/CSS dev in JetBrains' free Community Edition IDEs.