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

feat(eslint-plugin): add new rule: enforce-class-compile (#3505) #3506

Merged
merged 7 commits into from
Mar 14, 2024

Conversation

levchak0910
Copy link
Contributor

This ESLint rule can help with the code base migration to transformer-compile-class, closes #3505

Currently only Vue files supported, since I didn't work with Svelte and JSX hence I may not know all usage scenarios. If this PR accepted, I will file two new issues with ask to help implement support for those files too.

Copy link

netlify bot commented Jan 11, 2024

Deploy Preview for unocss ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit fbaa569
🔍 Latest deploy log https://app.netlify.com/sites/unocss/deploys/65ee615d21e97b00084d948d
😎 Deploy Preview https://deploy-preview-3506--unocss.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@levchak0910 levchak0910 force-pushed the feat/eslint-enforce-class-compile branch 2 times, most recently from 9bddc11 to 35990d9 Compare January 11, 2024 15:51
@antfu
Copy link
Member

antfu commented Jan 25, 2024

Can we have some tests to it? Thanks

@levchak0910
Copy link
Contributor Author

Yes, I can add.
I didn't add them initially because I didn't find a prepared lib/code for it. I will add mocha and tests for this rule later.
Thanks )

@levchak0910 levchak0910 force-pushed the feat/eslint-enforce-class-compile branch from ba4a244 to 4f33efb Compare January 25, 2024 19:22
@levchak0910 levchak0910 force-pushed the feat/eslint-enforce-class-compile branch from 4f33efb to 4b1f084 Compare January 25, 2024 20:02
@jacob-8
Copy link
Contributor

jacob-8 commented Mar 11, 2024

Currently only Vue files supported, since I didn't work with Svelte and JSX hence I may not know all usage scenarios. If this PR accepted, I will file two new issues with ask to help implement support for those files too.

I would recommend not opening an issue for help in doing this with Svelte unless a Svelte user specifically does it themselves. The reason is that if someone is looking to save on size with compilation mode then they're probably already using the svelte-scoped mode which automatically compiles all UnoCSS. I would also recommend not opening an issue for JSX to ask for help. If no one wants it and no one is there to help then it's just noise. If someone wants it, then encourage them to open a PR and do it. I've updated your doc additions to reflect these thoughts.

@antfu antfu removed the need tests label Mar 14, 2024
@antfu antfu added this pull request to the merge queue Mar 14, 2024
Merged via the queue into unocss:main with commit 25a938f Mar 14, 2024
9 checks passed
@levchak0910 levchak0910 deleted the feat/eslint-enforce-class-compile branch March 14, 2024 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add rule: enforce-class-compile to eslint-plugin
3 participants