Provide the equivalent of the SLDS Validator as a feature in Illuminated Cloud

Issue #2716 resolved
Phil W created an issue

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.

Official response

  • Scott Wells repo owner

    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.

Comments (4)

  1. Scott Wells repo owner

    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.

  2. Scott Wells repo owner

    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:

    • 141 and 144 - There are issues with the file position values specified for diagnostics and, more importantly, edits to be applied by code fixes.
    • 142 - sldsValidatorAllow doesn't seem to resume static code analysis properly. I suggest just using sldsValidatorIgnoreNextLine until this is fixed.
    • 143 - Some issues are still reported after applying the suggested quick fix. I suggest getting the code into the desired state and then suppress any remaining false positive using the Suppress with 'sldsValidatorIgnoreNextLine' comment context action.

    As a result, this will be considered a beta-level integration until those issues – at least the most egregious of them – are fixed.

  3. Scott Wells repo owner

    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.

  4. Log in to comment