Skip to content

Commit

Permalink
new: tailwind/write-better-tailwind-with-eslint.md
Browse files Browse the repository at this point in the history
  • Loading branch information
byt3h3ad committed Jan 29, 2024
1 parent 1b2f0af commit 7c6cc69
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tailwind/write-better-tailwind-with-eslint.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Write better CSS with `eslint-plugin-tailwindcss`

[`eslint-plugin-tailwindcss`](https://www.npmjs.com/package/eslint-plugin-tailwindcss) is an ESLint plugin that enforces best practices and consistency when using Tailwind CSS. It provides several rules that enforce best practices, such as ordering classnames, using shorthand, avoiding contradicting or custom classnames, and more. The plugin also parses the `tailwind.config.js` file and uses the correct values based on your own settings. To use the plugin, you need to install `ESLint` and `eslint-plugin-tailwindcss`, add `tailwindcss` to the plugins section of your `.eslintrc` configuration file, and configure the rules you want to use under the rules section. You can use the preset to get reasonable defaults. It works well with the official plugin `prettier-plugin-tailwindcss`, which formats your classnames according to the Tailwind CSS style guide.

0 comments on commit 7c6cc69

Please sign in to comment.