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

@webq/eslint

v1.0.0

Published

eslint rules for custom-elements-manifest

Readme

@webq/eslint

An ESLint plugin that validates custom element usage in HTML against a Custom Elements Manifest (CEM). It catches unknown attributes, events, slots, and more at lint time by reading your project's custom-elements.json.

Requirements

Installation

Install the ESLint plugin:

npm install @webq/eslint --save-dev

Install the webq (Web Components Query) CLI tool (required for validation):

npm install @webq/cli

# Or download a pre-built binary from GitHub releases
# https://github.com/blueprintui/webq/releases

Verify webq is available:

webq --version

Setup

This plugin uses ESLint flat config and requires @html-eslint/parser to parse HTML files.

Recommended Config

The quickest way to get started is with the recommended helper. It enables all rules with sensible defaults (error for unknown elements/attributes/events, warn for deprecations).

// eslint.config.js
import htmlParser from '@html-eslint/parser';
import { recommended } from '@webq/eslint';

export default [
  {
    files: ['**/*.html'],
    languageOptions: {
      parser: htmlParser
    },
    ...recommended({ cem: './path/to/custom-elements.json' })
  }
];

Manual Config

For more control, import the plugin directly and configure individual rules.

// eslint.config.js
import htmlParser from '@html-eslint/parser';
import webqPlugin from '@webq/eslint';

export default [
  {
    files: ['**/*.html'],
    languageOptions: {
      parser: htmlParser
    },
    plugins: {
      webq: webqPlugin
    },
    rules: {
      'webq/no-unknown-element': ['error', { path: './node_modules/project' }],
      'webq/no-unknown-attr': ['error', { path: './node_modules/project' }]
      // ...add more rules as needed
    }
  }
];

Rules

Every rule requires a path option pointing to your projects directory where the WebQ manifests are located.

Unknown Usage (error by default)

| Rule | Description | | ------------------------------------- | --------------------------------------------------------------- | | webq/no-unknown-element | Disallow custom elements not defined in the CEM | | webq/no-unknown-attr | Disallow attributes not defined in the CEM | | webq/no-unknown-attr-value | Disallow attribute values not matching the CEM type definitions | | webq/no-unknown-event | Disallow events not defined in the CEM | | webq/no-unknown-command | Disallow commands not defined in the CEM | | webq/no-unknown-slot | Disallow slot names not defined in the CEM | | webq/no-unknown-css-part | Disallow CSS parts not defined in the CEM | | webq/no-unknown-css-custom-property | Disallow CSS custom properties not defined in the CEM |

Deprecation Warnings (warn by default)

| Rule | Description | | ---------------------------- | ------------------------------------------- | | webq/no-deprecated-element | Warn when using a deprecated custom element | | webq/no-deprecated-attr | Warn when using a deprecated attribute | | webq/no-deprecated-slot | Warn when using a deprecated slot | | webq/no-deprecated-event | Warn when using a deprecated event | | webq/no-deprecated-command | Warn when using a deprecated command |

Best Practices (warn by default)

| Rule | Description | | ---------------------------- | --------------------------------------------------------------------------------------------------------------------------- | | webq/no-boolean-attr-value | Warn when a boolean attribute is set with an explicit value (e.g. prefer <x-btn disabled> over <x-btn disabled="true">) |

Custom Elements Manifest

This plugin reads a Custom Elements Manifest (custom-elements.json) to understand your component API. Most web component libraries ship one, or you can generate it with tools like @custom-elements-manifest/analyzer.

License

MIT