This rule was implemented as a `run_once` method which just iterated over symbols. Implement using `run_on_symbol` instead to avoid the additional iteration.
`get_parent_es5_component` and `get_parent_es6_component` were always used together. Combine the two into a single function to only iterate over ancestors once, instead of twice.
`get_parent_es6_component` was finding *any* binding which is inside a class component, rather than parent of current node, leading to false positives.
The added test cases were not behaving correctly previously.
This PR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
| [crate-ci/typos](https://redirect.github.com/crate-ci/typos) | action
| patch | `v1.24.3` -> `v1.24.5` |
---
### Release Notes
<details>
<summary>crate-ci/typos (crate-ci/typos)</summary>
###
[`v1.24.5`](https://redirect.github.com/crate-ci/typos/releases/tag/v1.24.5)
[Compare
Source](https://redirect.github.com/crate-ci/typos/compare/v1.24.4...v1.24.5)
#### \[1.24.5] - 2024-09-04
##### Features
- *(action)* Support windows
###
[`v1.24.4`](https://redirect.github.com/crate-ci/typos/releases/tag/v1.24.4)
[Compare
Source](https://redirect.github.com/crate-ci/typos/compare/v1.24.3...v1.24.4)
#### \[1.24.4] - 2024-09-03
##### Fixes
- Offer a correction for `grather`
</details>
---
### Configuration
📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).
🚦 **Automerge**: Enabled.
♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.
🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box
---
This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/oxc-project/oxc).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC41OS4yIiwidXBkYXRlZEluVmVyIjoiMzguNTkuMiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Adds tests for class and object methods. Diagnostics for the former have incorrect spans.
```javascript
class Foo {
// span covers `() {}`
async foo() {}
}
```
closes#611
@leaysgur Kicking of `no-invalid-regexp`, feel free to take over and claim the bounty on #611😁
I can continue if you wanna work on other stuff (getting confused in prettier land ;-))