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

Add ignoreFunctions: [] to function-no-unknown #5900

Closed
mizozobu opened this issue Feb 9, 2022 · 5 comments · Fixed by #5901
Closed

Add ignoreFunctions: [] to function-no-unknown #5900

mizozobu opened this issue Feb 9, 2022 · 5 comments · Fixed by #5901
Labels
status: wip is being worked on by someone type: new option a new option for an existing rule

Comments

@mizozobu
Copy link

mizozobu commented Feb 9, 2022

What is the problem you're trying to solve?

function-no-unknown throws an error when using non-standard funcitons such as tailwindcss theme function.

What solution would you like to see?

It would be nice to have a feature to ignore certain functions just like ignoreAtRules of at-rule-no-unknown.

@jeddy3 jeddy3 changed the title feature to ignore certain functions in function-no-unknown Add ignoreFunctions: [] to function-no-unknown Feb 9, 2022
@jeddy3 jeddy3 added status: ready to implement is ready to be worked on by someone type: new option a new option for an existing rule labels Feb 9, 2022
@jeddy3
Copy link
Member

jeddy3 commented Feb 9, 2022

@mizozobu Thanks for the request and for using the template.

Sounds good to me.

I've labelled the issue as ready to implement. Please consider contributing if you have time.

There are steps on how to add a new option in the Developer guide.

Out of curiosity, does Tailwind have an dashed ident alias for theme(), e.g. --tailwind-theme(), that you can use?

@ybiquitous ybiquitous added status: wip is being worked on by someone and removed status: ready to implement is ready to be worked on by someone labels Feb 9, 2022
@ybiquitous
Copy link
Member

@mizozobu Thanks for the suggestion. I've opened a pull request #5901.

@mizozobu
Copy link
Author

@jeddy3

Out of curiosity, does Tailwind have an dashed ident alias for theme(), e.g. --tailwind-theme(), that you can use?

Not that I know of, or at least it's not documented. I've tried --tailwind-theme() and --tw-theme(), but no luck. My best guess is that tailwindcss performs some transformation with postcss instead of exposing their functions.

https://github.com/tailwindlabs/tailwindcss/blob/5ea67b0a86be1df2a2392dd17468de61e5b4b6f7/tests/evaluateTailwindFunctions.test.js#L9-L32

@jeddy3
Copy link
Member

jeddy3 commented Feb 10, 2022

Thanks for trying them out. Maybe they'll add them in the future.

@jeddy3
Copy link
Member

jeddy3 commented Feb 10, 2022

Released in 14.5.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: wip is being worked on by someone type: new option a new option for an existing rule
Development

Successfully merging a pull request may close this issue.

3 participants