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(linter): add react/jsx-filename-extension rule #9474

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

Conversation

cdrikd
Copy link
Contributor

@cdrikd cdrikd commented Mar 1, 2025

Copy link

graphite-app bot commented Mar 1, 2025

How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

@github-actions github-actions bot added A-linter Area - Linter C-enhancement Category - New feature or request labels Mar 1, 2025
Copy link

codspeed-hq bot commented Mar 1, 2025

CodSpeed Performance Report

Merging #9474 will degrade performances by 3.04%

Comparing cdrikd:feature/lintRule-jsx_filename_extension (acc18b8) with main (1cc43f7)

Summary

❌ 1 regressions
✅ 38 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark BASE HEAD Change
parser_napi[RadixUIAdoptionSection.jsx] 4.8 ms 4.9 ms -3.04%

@cdrikd cdrikd marked this pull request as ready for review March 1, 2025 23:26
let jsx_elt = ctx
.nodes()
.iter()
.find(|&&x| matches!(x.kind(), AstKind::JSXElement(_) | AstKind::JSXFragment(_)));
Copy link
Member

Choose a reason for hiding this comment

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

This check is slow, probably should be moved to after checking the extension?

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 push a new commit, what do you think about this refactor c0d3550 ?
Iteration is not always done now, is it what you think about ?

@cdrikd cdrikd requested a review from camchenry March 8, 2025 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-linter Area - Linter C-enhancement Category - New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants