npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@blueprintjs/stylelint-plugin

v5.2.0

Published

Stylelint rules for use with @blueprintjs packages

Downloads

5,980

Readme

Blueprint stylelint plugin

Blueprint is a React UI toolkit for the web.

This package contains the stylelint plugin for Blueprint. It provides custom rules which are useful when developing against Blueprint libraries.

Key features:

Installation

pnpm add --save-dev @blueprintjs/stylelint-plugin

Usage

Simply add this plugin in your .stylelintrc file and then pick the rules that you need. The plugin includes Blueprint-specific rules which enforce semantics particular to usage with @blueprintjs packages, but does not turn them on by default.

.stylelintrc

{
    "plugins": ["@blueprintjs/stylelint-plugin"],
    "rules": {
        "@blueprintjs/no-color-literal": true,
        "@blueprintjs/no-prefix-literal": true,
        "@blueprintjs/prefer-spacing-variable": true
    }
}

Rules

@blueprintjs/no-color-literal (autofixable)

Enforce usage of the color variables instead of color literals.

{
    "rules": {
        "@blueprintjs/no-color-literal": true
    }
}
-.my-class {
-    border: 1px solid #137CBD;
-}
+ @use "@blueprintjs/core/lib/scss/variables.scss" as bp;
+
+.my-class {
+    border: 1px solid bp.$blue3;
+}

Optional secondary options:

  • disableFix: boolean - if true, autofix will be disabled
  • variablesImportPath: { less?: string, sass?: string } - can be used to configure a custom path for importing Blueprint variables when autofixing.

@blueprintjs/no-prefix-literal (autofixable)

Enforce usage of the bp-ns constant over namespaced string literals.

The @blueprintjs package exports a bp-ns CSS variable which contains the prefix for the current version of Blueprint (bp3 for Blueprint 3, bp4 for Blueprint 4, and etc). Using the variable instead of hardcoding the prefix means that your code will still work when new major version of Blueprint is released.

{
    "rules": {
        "@blueprintjs/no-prefix-literal": true
    }
}
-.bp3-button > div {
-    border: 1px solid black;
-}
+ @use "@blueprintjs/core/lib/scss/variables.scss" as bp;
+
+.#{bp.$ns}-button > div {
+    border: 1px solid black;
+}

Optional secondary options:

  • disableFix: boolean - if true, autofix will be disabled
  • variablesImportPath: { less?: string, sass?: string } - can be used to configure a custom path for importing Blueprint variables when autofixing.

@blueprintjs/prefer-spacing-variable (autofixable)

Enforce usage of the new $pt-spacing variable instead of the deprecated $pt-grid-size variable.

Blueprint is migrating from a 10px-based grid system ($pt-grid-size) to a 4px-based spacing system ($pt-spacing) to provide more flexible spacing options and improve consistency. This rule helps automate the migration by detecting deprecated variable usage and automatically converting expressions with proper multiplier adjustments.

{
    "rules": {
        "@blueprintjs/prefer-spacing-variable": true
    }
}
-.my-class {
-    padding: $pt-grid-size;
-    margin: $pt-grid-size * 2;
-    width: $pt-grid-size / 2;
-}
+.my-class {
+    padding: $pt-spacing * 2.5;
+    margin: $pt-spacing * 5;
+    width: $pt-spacing / 0.8;
+}

The rule automatically converts mathematical expressions by applying the 2.5x conversion factor (since $pt-grid-size is 10px and $pt-spacing is 4px).

Conversion examples:

  • $pt-grid-size$pt-spacing * 2.5
  • $pt-grid-size * 2$pt-spacing * 5
  • 2 * $pt-grid-size5 * $pt-spacing
  • $pt-grid-size / 2$pt-spacing / 0.8
  • bp.$pt-grid-size * 1.5bp.$pt-spacing * 3.75
  • calc($pt-grid-size * 1.5)calc($pt-spacing * 3.75)

Optional secondary options:

  • disableFix: boolean - if true, autofix will be disabled
  • variablesImportPath: { less?: string, sass?: string } - can be used to configure a custom path for importing Blueprint variables when autofixing.

See also: Spacing System Migration Guide

Full Documentation | Source Code