biomejs / biome

A toolchain for web projects, aimed to provide functionalities to maintain them. Biome offers formatter and linter, usable via CLI and LSP.
https://biomejs.dev
Apache License 2.0
12.86k stars 400 forks source link

Implement a lint rule to highlight the deprecated `@value` at-rule. #3001

Open denbezrukov opened 1 month ago

denbezrukov commented 1 month ago

Implement no-value-at-rule.

Many tools, such as lightningcss and swc, consider the @value at-rule deprecated in favor of CSS variables.

References:

Want to contribute? Lets you know you are interested! We will assign you to the issue to prevent several people to work on the same issue. Don't worry, we can unassign you later if you are no longer interested in the issue! Read our contributing guide and analyzer contributing guide.

denbezrukov commented 1 month ago

Hi @togami2864 ,

Could you please help me with this? Do you have any thoughts or suggestions?

Thank you!

togami2864 commented 1 month ago

Should this rule only apply to files with .module.css🤔

denbezrukov commented 1 month ago

Should this rule only apply to files with .module.css🤔

Hmm, interesting. We have a project with css modules but we don't write .module.css. I think it’s better to analyze all .css files, but the rule must work only if the option is enabled.

togami2864 commented 1 month ago

I think it’s better to analyze all .css files, but the rule must work only if the option is enabled.

Makes sense. We can ignore when the option is disabled since the parser will give a warning. https://biomejs.dev/playground/?lineWidth=120&files.main.css=QAB2AGEAbAB1AGUAIABiAGwAdQBlADoAIAAjADAAYwA3ADcAZgA4ADsA

rishabh3112 commented 3 weeks ago

@denbezrukov interested in contributing this change.