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

@chatbi-v/eslint-plugin-theme

v3.1.4

Published

ESLint rules for ChatBI theme enforcement and auto-fixing

Downloads

41

Readme

@chatbi-v/eslint-plugin-theme

ESLint plugin for enforcing ChatBI theme system rules and auto-fixing design debt.

Features

  • No Hardcoded Colors: Detects hex/rgb/hsl color values and suggests semantic tokens.
  • No Arbitrary Tailwind: Detects arbitrary Tailwind classes (e.g. bg-[#fff]) and auto-fixes them to token classes.
  • No Inline Styles: Warns against using inline styles for colors.
  • Auto Fix: Automatically replaces known hardcoded colors with theme tokens.

Installation

This plugin is part of the ChatBI Monorepo and is pre-configured in @chatbi-v/config.

If you need to install it manually:

pnpm add -D @chatbi-v/eslint-plugin-theme

Usage

In eslint.config.mjs (Flat Config)

import themePlugin from '@chatbi-v/eslint-plugin-theme';

export default [
  {
    plugins: {
      '@chatbi-v/theme': themePlugin,
    },
    rules: {
      '@chatbi-v/theme/no-hardcoded-colors': 'warn',
      '@chatbi-v/theme/no-inline-styles': 'warn',
      '@chatbi-v/theme/no-arbitrary-tailwind': 'warn',
    },
  },
];

Rules

@chatbi-v/theme/no-hardcoded-colors

Disallows hardcoded color values (Hex, RGB, HSL) in code.

Bad:

<div style={{ color: '#ef4444' }}>Error</div>;
const activeColor = '#3b82f6';

Good:

// Using Tailwind classes (Recommended)
<div className="text-error">Error</div>

// Or using token variables
const activeColor = tokens.brand.500;

@chatbi-v/theme/no-arbitrary-tailwind

Disallows arbitrary values in Tailwind classes if a matching token exists. Supports Auto-fix.

Bad:

<div className="bg-[#ffffff]">Card</div>

Good (Auto-fixed):

<div className="bg-surface-canvas">Card</div>

@chatbi-v/theme/no-inline-styles

Disallows using style={{ ... }} for coloring.

Bad:

<div style={{ backgroundColor: 'white' }}>Card</div>

Good:

<div className="bg-surface-canvas">Card</div>

Token Loading

The plugin attempts to load theme tokens dynamically from:

  1. packages/libs/theme/dist/presets/deepinsight-default.cjs
  2. node_modules/@chatbi-v/theme/...

Ensure @chatbi-v/theme is built (pnpm build --filter @chatbi-v/theme) for the most accurate token matching.