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(biome_css_analyze): noDuplicateSelectors #2660

Draft
wants to merge 22 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
564b995
Bootstrapped and added basic logic and failing tests.
abidjappie Apr 25, 2024
08c949e
Added some helpful comments and save progress.
abidjappie Apr 25, 2024
c4674af
WIP: it currently returns everything in a single run, we need to spli…
abidjappie Apr 30, 2024
99af5a2
Working solution excluding some edge cases, still using a visitor nee…
abidjappie Apr 30, 2024
b6b3d1e
WIP: removed the visitor, simplified the logic, added stylelint test …
abidjappie May 2, 2024
87a6f5e
WIP: Added option cases, many more test cases are passing. Next: pass…
abidjappie May 3, 2024
3965886
WIP: Fixed test case. some cleaning.
abidjappie May 3, 2024
3d58e8e
All the current valid and invalid cases are now working as expected. …
abidjappie May 5, 2024
3ed2b90
Added option test cases, updated the diagnostics. WIP: cleanup.
abidjappie May 5, 2024
65e6ba9
Ran gen-lint.
abidjappie May 6, 2024
0b51c52
Added more test cases, adjusted the at-rule logic.
abidjappie May 6, 2024
40de23d
Code structure improvements and simplifications.
abidjappie May 7, 2024
2ed1405
Linting.
abidjappie May 7, 2024
8feeeda
Added additional test cases, updated the diagnostic messages.
abidjappie May 7, 2024
648ffdd
Fixed typo.
abidjappie May 7, 2024
6ed13f2
Fixed merge conflicts, gen.
abidjappie May 7, 2024
e667f3c
Better diagnostic reporting.
abidjappie May 7, 2024
7e2b209
Addressed linter feedback. WIP: addressing review feedback.
abidjappie May 7, 2024
4471c4f
WIP: added comments.
abidjappie May 8, 2024
f453e8c
WIP: added comments.
abidjappie May 8, 2024
911eacf
Handle the text in the diagnostics.
abidjappie May 8, 2024
04556f6
Fixed merge conflicts, gen.
abidjappie May 9, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
75 changes: 48 additions & 27 deletions crates/biome_configuration/src/linter/rules.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions crates/biome_css_analyze/src/lint/nursery.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use biome_analyze::declare_group;
pub mod no_color_invalid_hex;
pub mod no_css_empty_block;
pub mod no_duplicate_font_names;
pub mod no_duplicate_selectors;
pub mod no_duplicate_selectors_keyframe_block;
pub mod no_important_in_keyframe;
pub mod no_unknown_unit;
Expand All @@ -16,6 +17,7 @@ declare_group! {
self :: no_color_invalid_hex :: NoColorInvalidHex ,
self :: no_css_empty_block :: NoCssEmptyBlock ,
self :: no_duplicate_font_names :: NoDuplicateFontNames ,
self :: no_duplicate_selectors :: NoDuplicateSelectors ,
self :: no_duplicate_selectors_keyframe_block :: NoDuplicateSelectorsKeyframeBlock ,
self :: no_important_in_keyframe :: NoImportantInKeyframe ,
self :: no_unknown_unit :: NoUnknownUnit ,
Expand Down