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

Rule Change: Allow for configurable at rules #35

Open
1 task
bradgarropy opened this issue Dec 19, 2024 · 0 comments
Open
1 task

Rule Change: Allow for configurable at rules #35

bradgarropy opened this issue Dec 19, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@bradgarropy
Copy link

bradgarropy commented Dec 19, 2024

What rule do you want to change?

no-invalid-at-rules

What change do you want to make?

Generate fewer warnings

How do you think the change should be implemented?

A new option

Example code

@tailwind base;
@tailwind components;
@tailwind utilities;

What does the rule currently do for this code?

Here is a minimal reproduction of the current state of things.
https://stackblitz.com/edit/no-irregular-whitespace-ey1hdv5b

Currently, the rule shows an error, as it does not understand Tailwind's custom @tailwind at rule.

/home/projects/better-tailwind-support/tailwind.css
   1:1   error  Unknown at-rule '@tailwind' found                                                                           css/no-invalid-at-rules
   2:1   error  Unknown at-rule '@tailwind' found                                                                           css/no-invalid-at-rules
   3:1   error  Unknown at-rule '@tailwind' found                                                                           css/no-invalid-at-rules

What will the rule do after it's changed?

We should introduce a new option to the rule, so we can add other supported custom at rules, like @tailwind.

I would expect the configuration to look something like this:

"css/no-invalid-at-rules": ["error", "@tailwind", "@other", ...]

Participation

  • I am willing to submit a pull request to implement this change.

Additional comments

/cc @JoshuaKGoldberg

@bradgarropy bradgarropy added the enhancement New feature or request label Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant