Skip to content
PluginStats

@salesforce-ux/eslint-plugin-slds weekly downloads statistics

By salesforce-ux · npm · ESLint plugins

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

View on npm Stale · Oct 18, 2026

@salesforce-ux/eslint-plugin-slds has 54,784 recorded weekly downloads on npm, a decrease of 39.2% over the past 30 days, ranking #573 of 2,391 tracked listings.

Weekly downloads
54,784
Official API · Oct 18, 2026
7-day growth
-47.6%
-49.8K weekly downloads
30-day growth
-39.2%
-35.3K weekly downloads
90-day growth
-49.4%
-53.5K weekly downloads
Rank
#573
Among tracked npm listings

About @salesforce-ux/eslint-plugin-slds

@salesforce-ux/eslint-plugin-slds

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

Requirements

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

Install

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

Configure

ESLint v8 (Legacy Config)
// .eslintrc.js
module.exports = {
  plugins: ['@salesforce-ux/slds'],
  extends: ['plugin:@salesforce-ux/slds/recommended']
};
ESLint v9+ (Flat Config)
Basic Configuration
// 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']
  }
]);
Using with Other Plugins

To use the ESLint plugin with other plugins, add the sldsCssPlugin() helper function to the eslint.config.mjs configuration file. The sldsCssPlugin() function returns an object that contains the configurations for the ESLint plugin. This makes it easy to combine the ESLint plugin with other plugins while maintaining all the required dependencies.

For example, to use the ESLint plugin with the CSS plugin, add the CSS plugin configuration to the object containing the ESLint plugin configuration.

// eslint.config.mjs
import { defineConfig } from 'eslint/config';
import css from '@eslint/css';
import { sldsCssPlugin } from '@salesforce-ux/eslint-plugin-slds';

export default defineConfig([
  {
    files: ['**/*.css'],
    language: 'css/css',
    plugins: {
      css: css,
      ...sldsCssPlugin()
    },
    extends: ['@salesforce-ux/slds/recommended', 'css/recommended']
  }
]);

Migrate to the Latest Version

By default, the latest version of the plugin supports legacy and flat config systems.

Supported Rules

HTML/Component Rules
  • enforce-bem-usage: Identifies instances that use the double-dash (--) syntax for block-element-modifier (BEM) in classes.
  • no-deprecated-classes-slds2: Identifies classes that aren't available in SLDS 2.
  • modal-close-button-issue: Identifies instances where the CSS classes or component attributes for the modal close button must be changed to follow the modal component blueprint.
CSS Rules
  • no-hardcoded-values-slds2: Identifies static or hard-coded values that must be replaced with SLDS 2 styling hooks.
  • no-slds-class-overrides: Identifies existing class names that must be replaced with new custom CSS classes, instead of overriding SLDS selectors.
  • no-slds-var-without-fallback: Identifies SLDS styling hooks that are specified without fallback values and recommends suitable fallback values based on the SLDS metadata. The fallback values are used in Salesforce environments where styling hooks are unavailable.
  • no-slds-namespace-for-custom-hooks: Identifies custom styling hooks that use the --slds or --sds namespaces, which are reserved for SLDS styling hooks. To differentiate custom styling hooks from SLDS styling hooks, create custom styling hooks in your namespace.
  • no-slds-private-var: Identifies SLDS styling hooks that are reserved only for internal Salesforce use. Private SLDS styling hooks have prefixes --_slds- and --slds-s-.
  • no-unsupported-hooks-slds2: Identifies styling hooks that aren't present in SLDS 2. They must be replaced with styling hooks that have a similar effect, or they must be removed.
  • no-sldshook-fallback-for-lwctoken: Identifies instances where --slds styling hooks are provided as fallback values for --lwc tokens.
  • enforce-sds-to-slds-hooks: Identifies Salesforce Design System (SDS) styling hooks that must be replaced with the suggested SLDS 2 styling hooks. For more information, see lightningdesignsystem.com.
  • enforce-component-hook-naming-convention: Identifies --slds-c component-level styling hooks that use a deprecated naming convention.
  • no-deprecated-slds-classes: Please replace the deprecated classes with a modern equivalent.
  • reduce-annotations: Identifies annotations that must be removed from the code.
  • lwc-token-to-slds-hook: Identifies the deprecated --lwc tokens that must be replaced with the latest --slds tokens. For more information, see lightningdesignsystem.com.

Closest Color Suggestion Logic

This plugin suggests SLDS styling hooks that are perceptually closest to a given hardcoded color. The logic lives in src/utils/color-lib-utils.ts and is used by no-hardcoded-values-slds2.

  • API surface

    • findClosestColorHook(color, supportedColors, cssProperty): string[] Returns up to 5 hook names, ordered by category priority and perceptual distance.
    • isHardCodedColor(value): boolean Detects if a string likely represents a hardcoded color (excludes CSS var(...)).
  • Perceptual metric

    • Uses chroma.deltaE (CIEDE2000) to compare the input color against known SLDS color values.
    • A threshold (DELTAE_THRESHOLD = 25) controls how strict the matching is.
    • Exact hex matches short-circuit to distance 0 to avoid float rounding differences.
  • Category ordering

    • Hooks are ranked by category, then by distance (ascending):
      1. Semantic hooks (e.g., surface, accent, error, success, etc.)
      2. System hooks
      3. Palette hooks
    • Only the top 5 suggestions are returned.
  • Property awareness

    • Suggestions consider the CSS property from rule context.
    • Hooks declared for the same property (or *) are prioritized if within the distance threshold.
  • CSS variables

    • Values using var(...) are not flagged as hardcoded colors and are excluded from matching.…

Description from the npm listing.

  • eslint
  • eslint-plugin
  • lightning-design-system
  • slds2

README badge

Show your rank in a README or on your website. The badge updates automatically.

Charts

Images: 30d · 1y · all time · 1600×900 dark

Adoption over time

@salesforce-ux/eslint-plugin-slds weekly downloads on npm, last 90 days: 54,784 weekly downloads as of Oct 18, 2026, -49.4% over 90 days.@salesforce-ux/eslint-plugin-sldsWeekly downloads on npm · Last 90 days54,784downloads / week-49.4% over 90 days40K60K80K100K120K140KJul 20Aug 4Aug 19Sep 3Sep 18Oct 3Oct 18downloads / weekobservedarchived (Internet Archive)no observationsJul 23, 2026 – Oct 18, 2026 · 88 observations · Updated Oc…pluginstats.com
@salesforce-ux/eslint-plugin-slds weekly downloads on npm, last 90 days: 54,784 weekly downloads as of Oct 18, 2026, -49.4% over 90 days.

7/30/90-day growth

@salesforce-ux/eslint-plugin-slds weekly downloads growth on npm: -47.6% over 7 days, -39.2% over 30 days, -49.4% over 90 days.@salesforce-ux/eslint-plugin-sldsWeekly downloads growth on npm54,784downloads / week now7-day growth-49,814 weekly downloads-47.6%30-day growth-35,257 weekly downloads-39.2%90-day growth-53,510 weekly downloads-49.4%Growth vs. nearest observation to each baseline date · Updated Oct 18, 2026pluginstats.com
@salesforce-ux/eslint-plugin-slds weekly downloads growth on npm: -47.6% over 7 days, -39.2% over 30 days, -49.4% over 90 days.

Ranking history

@salesforce-ux/eslint-plugin-slds npm ranking history: currently #573 (by weekly downloads).@salesforce-ux/eslint-plugin-sldsnpm ranking · by weekly downloads · Last 90 days#573current rank#566#568#570#572#574#576Jul 23Aug 7Aug 22Sep 6Sep 21Oct 6Oct 21rankOct 18, 2026 – Oct 21, 2026 · 4 observations · Updated Oct 18, 2026pluginstats.com
@salesforce-ux/eslint-plugin-slds npm ranking history: currently #573 (by weekly downloads).

Listing placement

All npm2,389 listings · 120 pages · 1,195 shown · page 29, #13 (overall #573)
All npm: every listing in weekly downloads order

Listing placement

ESLint plugins258 listings · 13 pages · page 7, #16 (overall #136)
ESLint plugins: every listing in weekly downloads order

Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.

Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.

Recent observations

Full history (122)
Recent weekly downloads observations for @salesforce-ux/eslint-plugin-slds
Date (UTC)Weekly downloadsChange vs. previous
54,784+6.1K
48,729-5K
53,754+1.2K
52,553-25.1K
77,691-25.9K
103,5860
103,586-1K
104,598-692
105,290-486
105,776+3.5K
102,316+2.8K
99,552+1.5K
98,064-24.3K
122,392—

Data source

Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.

Listing: https://www.npmjs.com/package/@salesforce-ux/eslint-plugin-slds. First seen Oct 16, 2026; last successful collection Oct 21, 2026. See the methodology.