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

fix(codegen): new lint rule generation #2187

Merged
merged 7 commits into from
Mar 25, 2024

Conversation

unvalley
Copy link
Member

@unvalley unvalley commented Mar 25, 2024

Summary

In generate_new_lintrule.rs, this PR fixes

  • to use node.range() because reference isn't defined
  • to locate new lint rule in src/lint/nursery

Test Plan

Executed just new-js-lintrule ruleName without fail

@github-actions github-actions bot added the A-Tooling Area: internal tools label Mar 25, 2024
Copy link

netlify bot commented Mar 25, 2024

Deploy Preview for biomejs ready!

Name Link
🔨 Latest commit 18493e6
🔍 Latest deploy log https://app.netlify.com/sites/biomejs/deploys/66016dc9deedbd00087585ab
😎 Deploy Preview https://deploy-preview-2187--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: 96 (🔴 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.

@unvalley unvalley marked this pull request as draft March 25, 2024 10:43
@github-actions github-actions bot added the A-Linter Area: linter label Mar 25, 2024
Comment on lines +80 to +81
let _binding = ctx.query();
Some(())
Copy link
Member Author

Choose a reason for hiding this comment

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

The default template should emit diagnostic.
I think here we don't need to implement the rule because this is a template, so commenting out valid cases. Developers will delete the template before starting the dev.

@unvalley unvalley marked this pull request as ready for review March 25, 2024 12:06
Copy link
Member

@ematipico ematipico left a comment

Choose a reason for hiding this comment

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

Thank you! Please revert the changes in the list, then we can merge it

Comment on lines 65 to 67
1. The `Ast` query type allows you to query the AST of a program.
1. The `State` type doesn't have to be used, so it can be considered optional. However, it has to be defined as `type State = ()`.
1. Implement the `run` function:
Copy link
Member

@ematipico ematipico Mar 25, 2024

Choose a reason for hiding this comment

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

This was intentional, can you revert it please? If you list all numbers to 1. they will rendered automatically in order. This means you just need to add another 1 in case you're adding a new step in middle.

It's really convenient.

Copy link
Member Author

Choose a reason for hiding this comment

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

oh, I didn't know that. I restore the change!

@unvalley unvalley merged commit b1fda2a into biomejs:main Mar 25, 2024
15 checks passed
@unvalley unvalley deleted the fix-lint-generation branch March 25, 2024 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Linter Area: linter A-Tooling Area: internal tools
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants