-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
new: tailwind/write-better-tailwind-with-eslint.md
- Loading branch information
Showing
1 changed file
with
3 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |