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: css linter docs #2151

Merged
merged 9 commits into from
Mar 29, 2024
Merged

feat: css linter docs #2151

merged 9 commits into from
Mar 29, 2024

Conversation

togami2864
Copy link
Contributor

Summary

  • fix just tasks
  • added lintdoc and website for css linter.

Test Plan

CI should be passed

@github-actions github-actions bot added A-Project Area: project A-Tooling Area: internal tools A-Website Area: website L-CSS Language: CSS labels Mar 21, 2024
Copy link

netlify bot commented Mar 21, 2024

Deploy Preview for biomejs ready!

Name Link
🔨 Latest commit 8ab6f6b
🔍 Latest deploy log https://app.netlify.com/sites/biomejs/deploys/66069f0419ced400081fe2af
😎 Deploy Preview https://deploy-preview-2151--biomejs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 95 (🔴 down 4 from production)
Accessibility: 97 (no change from production)
Best Practices: 100 (no change from production)
SEO: 93 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

@togami2864 togami2864 self-assigned this Mar 21, 2024
@togami2864
Copy link
Contributor Author

I found that the CSS nursery lint rules are mixed in with the JS nursery:( Ideally, they should be separated, but I'm not sure how to do that yet, so I plan to look into it.

Screenshot 2024-03-20 at 16 21 44

Copy link

codspeed-hq bot commented Mar 21, 2024

CodSpeed Performance Report

Merging #2151 will not alter performance

Comparing togami2864:feat/csslint-doc (8ab6f6b) with main (5e219db)

Summary

✅ 93 untouched benchmarks

@ematipico
Copy link
Member

Yeah, it's the same for JSON lint rules. Ideally, we should add new icons to that table. We could put a small JS icon or CSS icon next to the name of the rule

justfile Outdated
# TODO: lintdoc, website, cargo doc
cargo run -p xtask_codegen -- new-lintrule --kind=css --name={{rulename}}
just gen-lint
just documentation
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just documentation runs the lintdoc job - which is run by gen-lint - and it checks the cargo docs. I don't think we need to run the cargo docs

@togami2864
Copy link
Contributor Author

We could put a small JS icon or CSS icon next to the name of the rule

I like this idea since the logic to generate categories and groups is a bit complicated :P

@togami2864
Copy link
Contributor Author

@ematipico I gave it a try. What do you think?
Screenshot 2024-03-23 at 1 18 28

@ematipico
Copy link
Member

Love it!

Comment on lines 232 to 238
#[derive(Debug, Default, Clone)]
pub enum LanguageKind {
#[default]
Js,
Json,
Css,
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any chance that we can avoid adding language metadata inside the generic crate?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried a bit, but it seems difficult for now. Each 'registry' will be visited, and rules will be stored in a BTreeMap, but since the visitor consolidates each nursery rules into one 'nursery', it becomes impossible to know the target language of those rules.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. Can we revert the change for now? I need some time to think about it

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done👍

@github-actions github-actions bot removed the A-Linter Area: linter label Mar 27, 2024
@togami2864 togami2864 merged commit c8c479c into biomejs:main Mar 29, 2024
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Project Area: project A-Tooling Area: internal tools A-Website Area: website L-CSS Language: CSS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants