Skip to content
PluginStats

eslint-plugin-tailwind-canonical-classes weekly downloads statistics

By MaisonnatM · npm · ESLint plugins

ESLint plugin to enforce canonical Tailwind CSS class names using Tailwind CSS v4's canonicalization API

View on npm Fresh · Oct 18, 2026

eslint-plugin-tailwind-canonical-classes has 23,371 recorded weekly downloads on npm, a decrease of 40.4% over the past 30 days, ranking #753 of 2,322 tracked listings.

Weekly downloads
23,371
Official API · Oct 18, 2026
7-day growth
-74.8%
-69.3K weekly downloads
30-day growth
-40.4%
-15.9K weekly downloads
90-day growth
-47.6%
-21.3K weekly downloads
Rank
#753
Among tracked npm listings

About eslint-plugin-tailwind-canonical-classes

eslint-plugin-tailwind-canonical-classes

npm version npm downloads License: MIT Node.js Version

ESLint plugin to enforce canonical Tailwind CSS class names using Tailwind CSS v4's canonicalization API.

📋 Table of Contents

✨ Features

  • 🔍 Automatic Detection: Automatically detects non-canonical Tailwind CSS class names in JSX/TSX, Svelte, and Vue files
  • 🔧 Auto-fix Support: Automatically fixes non-canonical classes using ESLint's auto-fix feature
  • 🎯 Tailwind CSS v4 Integration: Uses Tailwind CSS v4's official canonicalizeCandidates API
  • 📝 Multiple Format Support: Works with string literals, template literals, and JSX expressions
  • 🛠️ Utility Function Support: Detects and fixes classes in utility functions like cn(), clsx(), classNames(), twMerge(), and cva()
  • ⚡ Zero Config: Minimal configuration required to get started

📦 Installation

Install the plugin and its peer dependency:

npm install --save-dev eslint-plugin-tailwind-canonical-classes @tailwindcss/node

Or with yarn:

yarn add -D eslint-plugin-tailwind-canonical-classes @tailwindcss/node

Or with pnpm:

pnpm add -D eslint-plugin-tailwind-canonical-classes @tailwindcss/node
Requirements
  • Node.js >= 18.0.0
  • ESLint 8, 9, or 10
  • Tailwind CSS v4
  • @tailwindcss/node package
  • svelte-eslint-parser (optional, required for Svelte support)
  • vue-eslint-parser (optional, required for Vue support)
ESLint Version Compatibility
ESLint VersionFlat Config (eslint.config.*)Legacy Config (.eslintrc.*)
8.xSupportedSupported
9.xSupportedSupported
10.xSupportedNot available (removed by ESLint)

Note: ESLint 10 removes .eslintrc support entirely. If you are upgrading to ESLint 10, you must migrate to flat config.

🚀 Quick Start

  1. Install the plugin (see Installation)

  2. Add to your ESLint config (eslint.config.mjs):

    import tailwindCanonicalClasses from 'eslint-plugin-tailwind-canonical-classes';
    
    export default [
      ...tailwindCanonicalClasses.configs['flat/recommended'],
      {
        rules: {
          'tailwind-canonical-classes/tailwind-canonical-classes': [
            'warn',
            {
              cssPath: './app/styles/globals.css',
            },
          ],
        },
      },
    ];
    
  3. Run ESLint:

    npx eslint . --fix
    

⚙️ Configuration

Flat Config (ESLint 8+) — Recommended

Using the built-in flat/recommended config:

import tailwindCanonicalClasses from 'eslint-plugin-tailwind-canonical-classes';

export default [
  ...tailwindCanonicalClasses.configs['flat/recommended'],
  {
    rules: {
      'tailwind-canonical-classes/tailwind-canonical-classes': [
        'warn', // or 'error'
        {
          cssPath: './app/styles/globals.css', // Required
          rootFontSize: 16, // Optional, default: 16
          calleeFunctions: ['cn', 'clsx'], // Optional, default: ['cn', 'clsx', 'classNames', 'twMerge', 'cva']
        },
      ],
    },
  },
];
Svelte (Flat Config)

Install the Svelte parser alongside the plugin:

npm install --save-dev svelte-eslint-parser

Then extend the built-in config:

import tailwindCanonicalClasses from 'eslint-plugin-tailwind-canonical-classes';

export default [
  ...tailwindCanonicalClasses.configs['flat/svelte'],
  {
    rules: {
      'tailwind-canonical-classes/tailwind-canonical-classes': [
        'warn',
        {
          cssPath: './src/app.css',
        },
      ],
    },
  },
];
Vue (Flat Config)

Install the Vue parser alongside the plugin:

npm install --save-dev vue-eslint-parser

Then extend the built-in config:

import tailwindCanonicalClasses from 'eslint-plugin-tailwind-canonical-classes';

export default [
  ...tailwindCanonicalClasses.configs['flat/vue'],
  {
    rules: {
      'tailwind-canonical-classes/tailwind-canonical-classes': [
        'warn',
        {
          cssPath: './src/style.css',
        },
      ],
    },
  },
];

Or with manual plugin registration:

import tailwindCanonicalClasses from 'eslint-plugin-tailwind-canonical-classes';

export default [
  {
    plugins: {
      'tailwind-canonical-classes': tailwindCanonicalClasses,
    },
    rules: {
      'tailwind-canonical-classes/tailwind-canonical-classes': [
        'warn',
        {
          cssPath: './app/styles/globals.css',
        },
      ],
    },
  },
];
Legacy Config (.eslintrc.js) — ESLint 8/9 only

Deprecated: Legacy config (.eslintrc) is not supported by ESLint 10. Migrate to flat config above.…

Description from the npm listing.

  • eslint
  • eslint-plugin
  • tailwind
  • tailwindcss
  • canonical
  • lint
  • css

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

eslint-plugin-tailwind-canonical-classes weekly downloads on npm, last 90 days: 23,371 weekly downloads as of Oct 18, 2026, -47.6% over 90 days.eslint-plugin-tailwind-canonical-class…Weekly downloads on npm · Last 90 days23,371downloads / week-47.6% over 90 days020K40K60K80K100K120KJul 20Aug 4Aug 19Sep 3Sep 18Oct 3Oct 18downloads / weekobservedarchived (Internet Archive)no observationsJul 22, 2026 – Oct 18, 2026 · 89 observations · Updated Oc…pluginstats.com
eslint-plugin-tailwind-canonical-classes weekly downloads on npm, last 90 days: 23,371 weekly downloads as of Oct 18, 2026, -47.6% over 90 days.

7/30/90-day growth

eslint-plugin-tailwind-canonical-classes weekly downloads growth on npm: -74.8% over 7 days, -40.4% over 30 days, -47.6% over 90 days.eslint-plugin-tailwind-canonical-class…Weekly downloads growth on npm23,371downloads / week now7-day growth-69,282 weekly downloads-74.8%30-day growth-15,874 weekly downloads-40.4%90-day growth-21,256 weekly downloads-47.6%Growth vs. nearest observation to each baseline date · Updated Oct 18, 2026pluginstats.com
eslint-plugin-tailwind-canonical-classes weekly downloads growth on npm: -74.8% over 7 days, -40.4% over 30 days, -47.6% over 90 days.

Ranking history

eslint-plugin-tailwind-canonical-classes npm ranking history: currently #753 (by weekly downloads).eslint-plugin-tailwind-canonical-class…npm ranking · by weekly downloads · Last 90 days#753current rank#750#755#760#765#770Jul 22Aug 6Aug 21Sep 5Sep 20Oct 5Oct 20rankOct 18, 2026 – Oct 20, 2026 · 3 observations · Updated Oct 18, 2026pluginstats.com
eslint-plugin-tailwind-canonical-classes npm ranking history: currently #753 (by weekly downloads).

Listing placement

All npm2,320 listings · 116 pages · 1,162 shown · page 38, #14 (overall #754)
All npm: every listing in weekly downloads order

Listing placement

ESLint plugins256 listings · 13 pages · page 10, #2 (overall #182)
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 eslint-plugin-tailwind-canonical-classes
Date (UTC)Weekly downloadsChange vs. previous
23,371+4.5K
18,919-4.3K
23,220-10.5K
33,744-22.2K
55,956-22.2K
78,1490
78,149-14.5K
92,653-4.3K
96,948-3.7K
100,598+5.6K
95,006+8.4K
86,651+8K
78,660-13.7K
92,338—

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/eslint-plugin-tailwind-canonical-classes. First seen Oct 16, 2026; last successful collection Oct 20, 2026. See the methodology.