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

@alexhayton/eslint-plugin-spectrum-web-components

v0.0.4

Published

ESLint plugin for Spectrum Web Components dev mode checks

Readme

eslint-plugin-spectrum-web-components

ESLint plugin for Spectrum Web Components dev mode checks.

Installation

You'll first need to install ESLint:

npm i eslint --save-dev

Next, install eslint-plugin-spectrum-web-components:

npm install @alexhayton/eslint-plugin-spectrum-web-components --save-dev

Usage

Flat Config (ESLint 9+)

Add @alexhayton/spectrum-web-components to the plugins section of your eslint.config.mjs configuration file. You can omit the eslint-plugin- prefix:

import spectrumWebComponents from "@alexhayton/eslint-plugin-spectrum-web-components";

export default [
    {
        files: ["**/*.js", "**/*.ts"],
        plugins: {
            "@alexhayton/spectrum-web-components": spectrumWebComponents
        },
        rules: {
            ...spectrumWebComponents.configs.recommended.rules
        }
    }
];

Legacy Config (ESLint 8)

Add @alexhayton/spectrum-web-components to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
    "plugins": [
        "@alexhayton/spectrum-web-components"
    ],
    "rules": {
        "@alexhayton/spectrum-web-components/accessible-action-menu": "warn",
        "@alexhayton/spectrum-web-components/accessible-avatar": "warn",
        "@alexhayton/spectrum-web-components/accessible-clear-button": "warn",
        "@alexhayton/spectrum-web-components/accessible-dialog-wrapper": "warn",
        "@alexhayton/spectrum-web-components/accessible-picker": "warn",
        "@alexhayton/spectrum-web-components/accessible-progress-bar": "warn",
        "@alexhayton/spectrum-web-components/no-deprecated-options": "warn",
        "@alexhayton/spectrum-web-components/overlay-trigger-triggered-by": "warn",
        "@alexhayton/spectrum-web-components/validate-theme-context": "warn"
    }
}

Rules

accessible-action-menu

Require accessible labeling on <sp-action-menu> elements.

Fail

html`<sp-action-menu></sp-action-menu>`;

Pass

html`<sp-action-menu label="More actions"></sp-action-menu>`;
html`<sp-action-menu aria-label="More actions"></sp-action-menu>`;
html`<sp-action-menu aria-labelledby="some-id"></sp-action-menu>`;

accessible-avatar

Require accessible attributes on <sp-avatar> elements.

Fail

html`<sp-avatar></sp-avatar>`;
html`<sp-avatar is-decorative href="#"></sp-avatar>`;

Pass

html`<sp-avatar label="User Name"></sp-avatar>`;
html`<sp-avatar is-decorative></sp-avatar>`;
html`<sp-avatar is-decorative label="User Name" href="#"></sp-avatar>`;

accessible-clear-button

Require a label attribute on <sp-clear-button> elements for screen reader accessibility.

Fail

html`<sp-clear-button></sp-clear-button>`;

Pass

html`<sp-clear-button label="Clear"></sp-clear-button>`;

accessible-dialog-wrapper

Require a headline attribute on <sp-dialog-wrapper> elements for screen reader accessibility.

Fail

html`<sp-dialog-wrapper></sp-dialog-wrapper>`;

Pass

html`<sp-dialog-wrapper headline="Dialog Title"></sp-dialog-wrapper>`;

accessible-picker

Require accessible labeling on <sp-picker> elements.

Fail

html`<sp-picker></sp-picker>`;

Pass

html`<sp-picker label="Select an option"></sp-picker>`;
html`<sp-picker aria-label="Select an option"></sp-picker>`;
html`<sp-picker aria-labelledby="some-id"></sp-picker>`;

accessible-progress-bar

Require accessible labeling on <sp-progress-bar> elements.

Fail

html`<sp-progress-bar></sp-progress-bar>`;

Pass

html`<sp-progress-bar label="Loading..."></sp-progress-bar>`;
html`<sp-progress-bar aria-label="Loading..."></sp-progress-bar>`;
html`<sp-progress-bar aria-labelledby="some-id"></sp-progress-bar>`;

no-deprecated-options

Disallow deprecated attribute values and attributes on Spectrum Web Components.

Fail

html`<sp-button variant="cta">Click me</sp-button>`;
html`<sp-theme color="lightest"></sp-theme>`;
html`<sp-overlay allow-outside-click></sp-overlay>`;

Pass

html`<sp-button variant="accent">Click me</sp-button>`;
html`<sp-theme color="light"></sp-theme>`;
html`<sp-overlay></sp-overlay>`;

overlay-trigger-triggered-by

Require triggered-by attribute on <overlay-trigger> elements for performance optimization.

Fail

html`<overlay-trigger>content</overlay-trigger>`;

Pass

html`<overlay-trigger triggered-by="click hover">content</overlay-trigger>`;

validate-theme-context

Require color, scale, and system attributes on <sp-theme> elements.

Fail

html`<sp-theme></sp-theme>`;
html`<sp-theme color="light"></sp-theme>`;

Pass

html`<sp-theme color="light" scale="medium" system="spectrum"></sp-theme>`;