Skip to content

ESLint plugin to automatically break up long tailwind class strings into multiple lines for better readability.

License

Notifications You must be signed in to change notification settings

pipech/eslint-plugin-readable-tailwind

 
 

Repository files navigation

eslint-plugin-readable-tailwind logo

GitHub license npm version GitHub issues npm weekly downloads GitHub repo stars GitHub workflow status




ESLint plugin to automatically break up long tailwind class strings into multiple lines at a certain printWith or class count for better readability. It also sorts the classes logically, removes unnecessary whitespaces and groups the classes by their modifiers. It works in jsx, svelte, vue, and html files and is designed to work well with and without prettier.



eslint-plugin-readable-tailwind example


Installation

npm i -D eslint-plugin-readable-tailwind

Usage

Please read the documentation for the specific flavor you are using:



Rules

💼 Configurations enabled in.
⚠️ Configurations set to warn in.
error Set in the error configuration.
warning Set in the warning configuration.
🔧 Automatically fixable by the --fix CLI option.

Name Description 💼 ⚠️ 🔧
multiline Enforce consistent line wrapping for tailwind classes. error warning 🔧
no-unnecessary-whitespace Disallow unnecessary whitespace in tailwind classes. error warning 🔧
sort-classes Enforce a consistent order for tailwind classes. error warning 🔧

About

ESLint plugin to automatically break up long tailwind class strings into multiple lines for better readability.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 99.1%
  • JavaScript 0.9%