-
-
Notifications
You must be signed in to change notification settings - Fork 779
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
Enhance blocklist
#3073
Comments
This would solve the user complaint which is primarily autocompleting other styles and possibly enforcing a convention 🙌🏼 The meta would be for tools like ESLint right? |
I would like this feature. I wish it gave me access to the rules that were already being enforced. |
These are all the differences between preset-windi and preset-uno that I could find.
I hope you can figure this out. The differences are too small for me to complain about. I can migrate and suck it up. |
I solved the problem this this set of regex. {
blocklist: [
/^(?:(?:m|p|b)a-)/,
/^(?:(?:op|of|position|flex|case|grid|decoration|line-height|b|c)-)/,
/^(?:bg|text|border|outline)-(?:[a-z]+[A-Z][a-z]+)/,
/^(?:bg|text|border|outline)-(?:[a-z]+)-[1-9]$/,
/^(?:object)-[a-z]{2}$/,
],
} |
Looks like he already started in 3392020 🙀 This isn't complete. For example Uno doesn't require the dash but TW does. Attributify also extracts rules like |
Yes, probably. But no, as I mentioned, we don't have an interest in doing that officially, as it would require a lot of effort, creating duplications, and I don't really see the benefit. |
@antfu It would be nice to support an additional blocklist: [
[/^border-/, { message: 'use "b-[val]"' }]
] But I'm not sure if it's possible to set a custom message in Eslint 👀 |
@enkot That sounds like a good idea. Would you like to implement it? We could later figure out how to pass it to ESLint |
Clear and concise description of the problem
Context: #3070 (comment)
Suggested solution
I think we could make
blocklist
:The interface I imagine:
Open for discussions
Alternative
No response
Additional context
No response
Validations
README.md
of using the package.The text was updated successfully, but these errors were encountered: