feat(linter) eslint-plugin-unicorn consistent function scoping#4948
Conversation
Your org has enabled the Graphite merge queue for merging into mainAdd the label “merge” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix. You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link. |
|
This stack of pull requests is managed by Graphite. Learn more about stacking. |
e180201 to
86a6d0e
Compare
crates/oxc_linter/src/rules/unicorn/consistent_function_scoping.rs
Outdated
Show resolved
Hide resolved
crates/oxc_linter/src/rules/unicorn/consistent_function_scoping.rs
Outdated
Show resolved
Hide resolved
CodSpeed Performance ReportMerging #4948 will not alter performanceComparing Summary
|
79e1a5e to
47f476d
Compare
crates/oxc_linter/src/rules/unicorn/consistent_function_scoping.rs
Outdated
Show resolved
Hide resolved
crates/oxc_linter/src/rules/unicorn/consistent_function_scoping.rs
Outdated
Show resolved
Hide resolved
47f476d to
91d431e
Compare
|
Will review this afternoon. |
f879f74 to
5ca0d45
Compare
Merge activity
|
fc7459b to
247120f
Compare
|
This broke ecosystem CI, https://github.com/oxc-project/oxlint-ecosystem-ci/actions/runs/10448337921/job/28928727073 Is category |
|
I think so, but this should not ban callback functions. If @camc314 is unable to address this today then I will |
|
maybe this rule should ignore tests? but i think it's ok for it to report call back functions? if you were adding an event listener multiple times, by moving the event listener to the outer scope (if possible), you avoid creating a function for each event you listen to - instead you'd just listen to one. |
|
We don't have a good way to detect test files. The warnings in preact is way too much https://github.com/oxc-project/oxlint-ecosystem-ci/actions/runs/10461140451/job/28969595249 Should we change the category or improve the rule to make ecosystem CI green? |
|
IMO, let's change the level until an improvement is merged. I'll get this in. |

No description provided.