Socket
Book a DemoInstallSign in
Socket

@salesforce-ux/eslint-plugin-slds

Package Overview
Dependencies
Maintainers
1
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@salesforce-ux/eslint-plugin-slds

ESLint plugin provides custom linting rules specifically built for Salesforce Lightning Design System 2 (SLDS 2 beta)

Source
npmnpm
Version
0.5.0
Version published
Weekly downloads
20K
9.5%
Maintainers
1
Weekly downloads
 
Created
Source

@salesforce-ux/eslint-plugin-slds

ESLint plugin provides custom linting rules specifically built for Salesforce Lightning Design System 2 (SLDS 2 beta).

Installation

npm install @salesforce-ux/eslint-plugin-slds --save-dev

Requirements

  • Node.js: 18.18.0 or higher
  • ESLint: 8.0.0 or 9.0.0+

Configuration

ESLint v8 (Legacy Config)

// .eslintrc.js
module.exports = {
  plugins: ['@salesforce-ux/slds'],
  extends: ['plugin:@salesforce-ux/slds/recommended']
};

ESLint v9+ (Flat Config)

// eslint.config.js
const { defineConfig } = require('eslint/config');
const sldsPlugin = require('@salesforce-ux/eslint-plugin-slds');

module.exports = defineConfig([
  {
    plugins: {
      '@salesforce-ux/slds': sldsPlugin
    },
    extends: ['@salesforce-ux/slds/recommended']
  }
]);

Migration Note

Always import the plugin from the root (@salesforce-ux/eslint-plugin-slds). The plugin automatically supports both legacy and flat config systems.

Rules

  • enforce-bem-usage: Enforces proper BEM methodology usage
  • no-deprecated-classes-slds2: Prevents usage of deprecated SLDS classes
  • modal-close-button-issue: Ensures proper modal close button implementation

License

ISC

Keywords

eslint

FAQs

Package last updated on 01 Aug 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts