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: useExportsLast #4172

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

tommymorgan
Copy link

Summary

This implements similar functionality to eslint-plugin-import/exports-last

Test Plan

Added tests and snapshots

@github-actions github-actions bot added A-Project Area: project A-Linter Area: linter L-JavaScript Language: JavaScript and super languages A-Diagnostic Area: diagnostocis A-Changelog Area: changelog labels Oct 3, 2024
@tommymorgan tommymorgan changed the title Feat/use exports last feat: useExportsLast Oct 3, 2024
Copy link

codspeed-hq bot commented Oct 4, 2024

CodSpeed Performance Report

Merging #4172 will not alter performance

Comparing tommymorgan:feat/useExportsLast (9949839) with main (773f5b0)

Summary

✅ 99 untouched benchmarks

Copy link
Contributor

@togami2864 togami2864 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! I left some comments

@github-actions github-actions bot added the A-CLI Area: CLI label Oct 7, 2024
@tommymorgan
Copy link
Author

@togami2864 Thank you so much for the feedback. I'm pretty new to rust and biome and I appreciate the guidance. I think I've addressed all your concerns and I also resolved the merge conflicts including re-running just gen-lint to resolve conflicts with generated files.

Copy link
Contributor

@togami2864 togami2864 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! Could you rebase?

@tommymorgan tommymorgan force-pushed the feat/useExportsLast branch 2 times, most recently from e832245 to cd1b1c6 Compare October 10, 2024 00:48
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.

We're almost there. One thing to address regarding the diagnostics. cc @togami2864 for visibility

Comment on lines 70 to 76
markup! {
"Export statements should appear at the end of the file."
},
)
.note(markup! {
"Move this export to the end of the file."
}),
Copy link
Member

Choose a reason for hiding this comment

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

In our contribution guide, we explain how to explain a diagnostic to the user. In this case, we don't explain the error. Can you address that, please?

Copy link
Author

Choose a reason for hiding this comment

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

I made an update that I hope is acceptable. I had previously read the contribution guide but I just missed the mark. Thank you for providing such detailed docs though. That and the PR help has really made making my first constribution approachable.

Copy link
Member

Choose a reason for hiding this comment

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

I believe there's been a misunderstanding. The previous message was fine, even better than the new one. What was missing is explain why exports should be moved, because that's the error. So the diagnostic should provide three notes:

  1. Error
  2. Explain the error
  3. Provide an actionable solution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Changelog Area: changelog A-CLI Area: CLI A-Diagnostic Area: diagnostocis A-Linter Area: linter A-Project Area: project L-JavaScript Language: JavaScript and super languages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants