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

improvement(linter/oxc): using facades for barrel detections. #3215

Conversation

rzvxa
Copy link
Collaborator

@rzvxa rzvxa commented May 9, 2024

closes #3069

It is similar to this, I've dialed back some package resolving to make it more general, We might want to invest in creating a package resolver(let me know if we already have the infrastructure for it and I've missed it).

@github-actions github-actions bot added A-linter Area - Linter A-ast Area - AST labels May 9, 2024
Copy link

codspeed-hq bot commented May 9, 2024

CodSpeed Performance Report

Merging #3215 will not alter performance

Comparing 05-09-improvement_linter_oxc_using_facades_for_barrel_detections (5ca8c56) with main (9525653)

Summary

✅ 27 untouched benchmarks

@rzvxa rzvxa marked this pull request as ready for review May 9, 2024 10:31
@rzvxa rzvxa requested a review from Boshen May 9, 2024 10:32
@rzvxa rzvxa marked this pull request as draft May 9, 2024 10:37
@rzvxa rzvxa force-pushed the 05-09-improvement_linter_oxc_using_facades_for_barrel_detections branch from bdb6fb6 to 9e07df8 Compare May 9, 2024 11:42
Copy link
Collaborator Author

rzvxa commented May 9, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @rzvxa and the rest of your teammates on Graphite Graphite


fn run(&self, node: &AstNode<'_>, ctx: &LintContext<'_>) {
let AstKind::ImportDeclaration(import) = node.kind() else { return };
if is_facade_import(ctx.file_path().to_str().unwrap(), import.source.value.as_str()) {
Copy link
Member

@Boshen Boshen May 9, 2024

Choose a reason for hiding this comment

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

I can simplify this, leave this to me.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Feel free to take over this PR, I'll start working on other stuff. Let me know if there is anything you want me to change.

@Boshen
Copy link
Member

Boshen commented May 9, 2024

Now I understand what this is doing when it's written in Rust 😅

@Boshen Boshen self-assigned this May 12, 2024
@Boshen Boshen added the P-high Priority - High label May 12, 2024
Boshen pushed a commit that referenced this pull request May 15, 2024
Boshen pushed a commit that referenced this pull request May 15, 2024
Boshen pushed a commit that referenced this pull request May 16, 2024
@rzvxa
Copy link
Collaborator Author

rzvxa commented May 16, 2024

Closed in favor of #3275

@rzvxa rzvxa closed this May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ast Area - AST A-linter Area - Linter P-high Priority - High
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat(linter): stabilize no-barrel-file
2 participants