Skip to content
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

[examples] Add new Tailwind CSS Prettier plugin to example #33614

Merged
merged 2 commits into from
Jan 24, 2022

Conversation

ecklf
Copy link
Member

@ecklf ecklf commented Jan 24, 2022

Documentation / Examples

  • Make sure the linting passes by running yarn lint

This PR adds the new official plugin for class sorting from Tailwind Labs to the Tailwind example.
Rel: https://tailwindcss.com/blog/automatic-class-sorting-with-prettier

@ijjk ijjk added the examples Issue/PR related to examples label Jan 24, 2022
@leerob leerob changed the title add new tailwindcss prettier plugin to example [examples] Add new Tailwind CSS Prettier plugin to example Jan 24, 2022
@kodiakhq kodiakhq bot merged commit 9a2d97c into vercel:canary Jan 24, 2022
kodiakhq bot pushed a commit that referenced this pull request Feb 5, 2022
## Documentation / Examples

- [x] Make sure the linting passes by running `yarn lint`

---
I'm getting this warning when running `yarn lint` on the local:
![Screen Shot 2022-02-05 at 23 45 57](https://user-images.githubusercontent.com/38455472/152651090-be515630-591a-4602-8bd7-eda71174dfda.png)

After a quick check, it is caused by the `tailwindConfig` option in the `prettier.config.js` file, added in PR #33614
I guess the reason is because the workspace does not install that plugin.

We can safely remove that option in the example, because it's already [the default location](https://github.com/tailwindlabs/prettier-plugin-tailwindcss):

> By default the plugin will look for this file in the same directory as your Prettier configuration file. However, if your Tailwind configuration is somewhere else, you can specify this using the tailwindConfig option in your Prettier configuration.

![Screen Shot 2022-02-06 at 00 12 24](https://user-images.githubusercontent.com/38455472/152651623-86655e80-e8d0-45b1-968c-81b7beed48ea.png)

The warning is gone after removing that option.
natew pushed a commit to natew/next.js that referenced this pull request Feb 16, 2022
)

## Documentation / Examples

- [x] Make sure the linting passes by running `yarn lint`

This PR adds the new official plugin for class sorting from Tailwind Labs to the Tailwind example.
Rel: https://tailwindcss.com/blog/automatic-class-sorting-with-prettier
natew pushed a commit to natew/next.js that referenced this pull request Feb 16, 2022
…#34019)

## Documentation / Examples

- [x] Make sure the linting passes by running `yarn lint`

---
I'm getting this warning when running `yarn lint` on the local:
![Screen Shot 2022-02-05 at 23 45 57](https://user-images.githubusercontent.com/38455472/152651090-be515630-591a-4602-8bd7-eda71174dfda.png)

After a quick check, it is caused by the `tailwindConfig` option in the `prettier.config.js` file, added in PR vercel#33614
I guess the reason is because the workspace does not install that plugin.

We can safely remove that option in the example, because it's already [the default location](https://github.com/tailwindlabs/prettier-plugin-tailwindcss):

> By default the plugin will look for this file in the same directory as your Prettier configuration file. However, if your Tailwind configuration is somewhere else, you can specify this using the tailwindConfig option in your Prettier configuration.

![Screen Shot 2022-02-06 at 00 12 24](https://user-images.githubusercontent.com/38455472/152651623-86655e80-e8d0-45b1-968c-81b7beed48ea.png)

The warning is gone after removing that option.
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
examples Issue/PR related to examples
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants