Set Up SLDS Validator
To get started with SLDS Validator, follow these steps.
-
Install Salesforce CLI.
-
Create a Salesforce DX project.
To turn on all SLDS Validator features, open your Salesforce DX project in a directory that contains ansfdx-project.json
file. If you don’t have a Salesforce DX project for development, create one in a scratch org with the SFDX: Create Project command. For development in a sandbox or DE org, use the SFDX: Create Project with Manifest command. -
Install the Java Standard Edition Development Kit (JDK).
Some features in Salesforce Extensions for VS Code depend upon the JDK. You must have either version 11, 17, 21, or the latest version of the JDK installed. To install the latest version, visit Java Downloads.
If you also use other versions of the Java JDK, set your VS Code user setting for salesforcedx-vscode-apex.java.home
to point to the location where you installed the appropriate Java version for SLDS Validator.
- Install VS Code v1.90.0 and later.
- To view SLDS Validator reports, install a Static Analysis Results Interchange Format (SARIF) Viewer VS Code extension, like this one.
To install SLDS Validator, install the Salesforce Extension Pack.