FAQ
For help with SLDS Linter, read our frequently asked questions.
What are the Node.js Requirements for SLDS Linter?
SLDS Linter works best with Node.js version v18.4.0 or later. You can check your Node.js version by using this command.
1node --versionIf you’re using an earlier version, upgrade to the latest Active Long Term Support (LTS) version of Node.js.
Does SLDS Linter Work on Windows Machines?
Yes, SLDS Linter works seamlessly on Windows systems.
The tool is platform-independent and can be used on Windows, Mac, and Linux systems. All features, including auto-fixing, configuration, and VS Code integration work consistently across all platforms.
How Do I automatically Fix Issues Identified by SLDS Linter?
See Autofix Your Code.
What Output Formats are Available to Display Identified Issues?
To display issues, SLDS Linter supports two formats.
-
SARIF format:
This is the default report format.
For example, here’s how to generate a SARIF report and place it in a specific directory.
1npx @salesforce-ux/slds-linter@latest report -o [output directory]The output file is named
slds-linter-report.sarif. -
CSV format:
You can generate a report in the CSV format using this command:
1npx @salesforce-ux/slds-linter@latest report --format csv
How Do I Enable Squiggly Lines for Errors?
To enable squiggly lines, follow these steps.
-
Install this recommended VS Code extension.
ESLint extension: Applicable for linting HTML, CMP, and CSS files.
-
Run the
emitcommand to generate a custom configuration file. The VS Code extension uses this file to show squiggly lines in HTML, CMP, and CSS files.1npx @salesforce-ux/slds-linter emitFor more information, see the Use SLDS Linter With Custom Configuration Files topic.