Skip to content

Comments

feat(linter): implement eslint/no-invalid-regexp#5443

Merged
graphite-app[bot] merged 1 commit intomainfrom
no-invalid-regexp
Sep 7, 2024
Merged

feat(linter): implement eslint/no-invalid-regexp#5443
graphite-app[bot] merged 1 commit intomainfrom
no-invalid-regexp

Conversation

@Boshen
Copy link
Member

@Boshen Boshen commented Sep 4, 2024

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 ;-))

@github-actions github-actions bot added the A-linter Area - Linter label Sep 4, 2024
@codspeed-hq
Copy link

codspeed-hq bot commented Sep 4, 2024

CodSpeed Performance Report

Merging #5443 will degrade performances by 37.94%

Comparing no-invalid-regexp (24d6a47) with main (2c3f3fe)

Summary

❌ 2 regressions
✅ 27 untouched benchmarks

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

Benchmarks breakdown

Benchmark main no-invalid-regexp Change
linter[cal.com.tsx] 804 ms 1,287.7 ms -37.57%
linter[checker.ts] 1.5 s 2.3 s -37.94%

@leaysgur
Copy link
Member

leaysgur commented Sep 5, 2024

OK, I will take this. 🤭 (Prettier... too far to go...)

@leaysgur
Copy link
Member

leaysgur commented Sep 6, 2024

Basically done.

But I'd like to fix diagnostic labels in the parser to align display. => #5543

@leaysgur
Copy link
Member

leaysgur commented Sep 7, 2024

Benchmark...why... 😮

@leaysgur
Copy link
Member

leaysgur commented Sep 7, 2024

The widest brown:

image

This rule:

image

...🤷🏻‍♂️

@Boshen
Copy link
Member Author

Boshen commented Sep 7, 2024

Strange ... I'll take a look.

@leaysgur
Copy link
Member

leaysgur commented Sep 7, 2024

According to #5570 (comment) , is it because New|CallExpression is called as frequently as UpdateExpression?

But the commit just before the performance problem was 1e26fce .

image

And here is a diff of that commit and the latest.

1e26fce...6a8c379

Since I only adjusted Span, why were there no performance issues at this point...?

@Boshen Boshen force-pushed the no-invalid-regexp branch 2 times, most recently from bd91c1a to 7fd4721 Compare September 7, 2024 13:57
@Boshen Boshen marked this pull request as ready for review September 7, 2024 14:08
@Boshen Boshen added the 0-merge Merge with Graphite Merge Queue label Sep 7, 2024
@graphite-app
Copy link
Contributor

graphite-app bot commented Sep 7, 2024

Merge activity

  • Sep 7, 10:08 AM EDT: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Sep 7, 10:09 AM EDT: Boshen added this pull request to the Graphite merge queue.
  • Sep 7, 10:13 AM EDT: Boshen merged this pull request with the Graphite merge queue.

@Boshen
Copy link
Member Author

Boshen commented Sep 7, 2024

Codspeed is drunk, I don't see anything wrong.

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 ;-))
@graphite-app graphite-app bot merged commit 24d6a47 into main Sep 7, 2024
@graphite-app graphite-app bot deleted the no-invalid-regexp branch September 7, 2024 14:13
@oxc-bot oxc-bot mentioned this pull request Sep 12, 2024
Boshen added a commit that referenced this pull request Sep 12, 2024
## [0.9.4] - 2024-09-12

### Features

- 9ca2593 linter: Eslint/sort-keys  (#4845) (Na'aman Hirschfeld)
- 023c160 linter: Impl `Serialize` for `OxlintConfig` (#5594) (DonIsaac)
- 24d6a47 linter: Implement `eslint/no-invalid-regexp` (#5443) (Boshen)

### Bug Fixes

- af6d240 linter: Panic in consistent-function-scoping (#5613)
(DonIsaac)
- 54e2e76 linter: `react/no_set_state` + `react/no_string_refs` rules
find correct parent (#5615) (overlookmotel)
- 3b87ac4 linter: Fix no_unused_vars panic when encountering unicode
(#5582) (Boshen)

### Performance

- bfe9186 linter: Use `cow_replace` instead of `replace` (#5643)
(dalaoshu)
- e3ae5db linter: Use cow_to_ascii_lowercase/uppercase (#5637) (heygsc)
- a0370bf linter: Use cow_utils in no_script_url (#5633) (heygsc)
- 37e922c linter: `eslint/no_shadow_restricted_names` use
`run_on_symbol` (#5618) (overlookmotel)
- 0b7fccf linter: `react/no_set_state` + `react/no_string_refs` rules
reduce iteration over ancestors (#5616) (overlookmotel)
- 2c3f3fe linter: Make `jsx_key` slightly faster (#5585) (Boshen)
- cd81d12 linter: Add `should_run` to check path only once to
nextjs/no_typos (#5584) (Boshen)
- d18c896 rust: Use `cow_utils` instead (#5664) (dalaoshu)

### Documentation

- 64f9575 linter: Add plugin usage to example with configuration
(Boshen)
- 8c9179d linter: Fix typos (#5591) (Brian Donovan)

### Refactor

- 9e9435f linter: Add `LintFilter` (#5685) (DonIsaac)
- 4f70fe5 linter: Start internal/external split of LintPluginOptions
(#5660) (DonIsaac)
- 5ae9b48 linter: Start internal/external split of `OxlintOptions`
(#5659) (DonIsaac)
- c8bc6f0 linter: Use `std::ptr::eq` (#5649) (overlookmotel)
- a37c064 linter: Use `ContentHash` for `no_duplicate_case`; remove
`calculate_hash` (#5648) (Boshen)
- 0b3c1d7 linter: Start internal/external split of `OxlintConfig`
(#5595) (DonIsaac)
- 89bdf55 linter: Inline `Rule` trait default methods (#5619)
(overlookmotel)
- afea8d5 linter: Rename `Rule` trait method params (#5617)
(overlookmotel)
- 4e748b5 linter: Replace ast "compare by hash" to "compare by content"
(#5602) (dalaoshu)
- bac03e3 linter: Make fields of `LintServiceOptions` private (#5593)
(DonIsaac)
- 2661d8b linter: Jest prefer_strict_equal (#5588) (IWANABETHATGUY)
- 20d0068 oxlint: Move cli-related exports to `cli` module (#5139)
(DonIsaac)
- 067f9b5 semantic: Introduce `IsGlobalReference` trait (#5672)
(Boshen)- 26d9235 Enable clippy::ref_as_ptr (#5577) (夕舞八弦)

### Testing

- 8e79f8d linter: Add class method test cases for `oxc/no-async-await`
(#5550) (DonIsaac)
- 3835189 linter: Add test case for no_unused_vars in 3b87ac4 (Boshen)
- 5f27551 linter: Add a passing case to no_undef (#5580) (Boshen)

---------

Co-authored-by: Boshen <[email protected]>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This was referenced Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

0-merge Merge with Graphite Merge Queue A-linter Area - Linter

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[$50 Opire Bounty] feat(linter): eslint/no-invalid-regexp

2 participants