Skip to content

docs: document how eslint-plugin-tailwindcss can be configured #2815

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: patch
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,29 @@ If you are using VSCode and the [Tailwind CSS IntelliSense Extension](https://ma

## Prettier plugin setup (optional)

If you are using [prettier-plugin-tailwindcss](https://github.com/tailwindlabs/prettier-plugin-tailwindcss) to sort your class names, you can add tv to the list of functions that should be sorted (on `.prettierrc`).
If you are using [prettier-plugin-tailwindcss](https://github.com/tailwindlabs/prettier-plugin-tailwindcss) to sort your class names, you can add `tva` to the list of functions that should be sorted (in `.prettierrc`).

```jsx
module.exports = {
plugins: ['prettier-plugin-tailwindcss'],
tailwindFunctions: ['tva'],
};
```

## ESlint plugin setup (optional)

If you are using [eslint-plugin-tailwindcss](https://github.com/francoismassart/eslint-plugin-tailwindcss) to lint your class names, you can add `tva` to the list of functions that should be linted (in `.eslintrc.js`).

```jsx
module.exports = {
extends: [
"expo",
"plugin:tailwindcss/recommended",
],
settings: {
tailwindcss: {
callees: ["classnames", "clsx", "ctl", "tva"],
},
},
};
```