Skip to content
This repository has been archived by the owner on Aug 1, 2021. It is now read-only.

jarrodldavis/eslint-plugin-tailwindcss

Repository files navigation

@jarrodldavis/eslint-plugin-tailwindcss

An ESLint plugin to enforce usage of Tailwind CSS utility and component classes.

Install

Install with npm or yarn:

npm install --save-dev @jarrodldavis/eslint-plugin-tailwindcss
yarn add --dev @jarrodldavis/eslint-plugin-tailwindcss

Usage

In your .eslintrc.json (or other .eslintrc.* configuration file):

{
  "plugins": ["@jarrodldavis/tailwindcss"],
  "rules": {
    "@jarrodldavis/tailwindcss/no-unknown-class": "error"
  }
}

The same can be accomplished using the recommended config:

{
  "extends": ["plugin:@jarrodldavis/tailwindcss/recommended"]
}

Rule Options

See the rule documentation for details about using and configuring the no-unknown-classes rule.