-
-
Notifications
You must be signed in to change notification settings - Fork 383
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
Add vscode tailwind extensions & prettier tailwind linter, sort tailwind classes #4622
base: main
Are you sure you want to change the base?
Conversation
Can we add linting as well then? Not everybody uses VSCode. |
Deployment of preview was successful: https://woodpecker-ci-woodpecker-pr-4622.surge.sh |
.gitpod.yml
Outdated
@@ -117,4 +117,6 @@ vscode: | |||
- 'redhat.vscode-yaml' | |||
- 'davidanson.vscode-markdownlint' | |||
- 'streetsidesoftware.code-spell-checker' | |||
- 'dejmedus.tailwind-sorter' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to be doing the same as the prettier sorting?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that's the idea?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am auto formatting with prettier on save which would now already sort the classes. Isn't using that plugin redundant?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.prettierrc.json
Outdated
@@ -4,5 +4,6 @@ | |||
"singleQuote": true, | |||
"printWidth": 120, | |||
"tabWidth": 2, | |||
"endOfLine": "lf" | |||
"endOfLine": "lf", | |||
"plugins": ["prettier-plugin-tailwindcss"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have to add this to the top-level config? There's no tailwind in there, only in web
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
web/ and docs/ refer to the top-level config currently. See also #4628
Maybe it can be done in a different way, then one does not need to install this in their global npm package stack.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah forget what I said, I think your proposed change should be just fine.
Co-authored-by: Anbraten <[email protected]>
These are the ones that cause the auto-sorting in all my recent PRs. If we would all use these (and sort all classes once), we'd have a predictable and consistent order of tailwind classes.