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

refactor(linter): use regex visitor in no-regex-spaces #6063

Merged

Conversation

camchenry
Copy link
Contributor

@camchenry camchenry commented Sep 26, 2024

Similar to previous PRs, this refactors the no-regex-spaces rule to use the RegExp AST visitor, rather than the handwritten implementation in this rule. This makes the rule much simpler and easier to maintain in the future.

Copy link

graphite-app bot commented Sep 26, 2024

Your org has enabled the Graphite merge queue for merging into main

Add the label “0-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.

Copy link

codspeed-hq bot commented Sep 26, 2024

CodSpeed Performance Report

Merging #6063 will not alter performance

Comparing 09-25-refactor_linter_use_regex_visitor_in_no-regex-spaces_ (9d5b44a) with main (2090fce)

Summary

✅ 29 untouched benchmarks

@camchenry camchenry force-pushed the 09-25-refactor_linter_use_regex_visitor_in_no-regex-spaces_ branch from f32cefe to 78fba4a Compare September 26, 2024 03:23
@camchenry camchenry force-pushed the 09-25-refactor_linter_use_regex_visitor_in_no-useless-escape_ branch from ed957be to 8d137b0 Compare September 26, 2024 03:35
@camchenry camchenry force-pushed the 09-25-refactor_linter_use_regex_visitor_in_no-regex-spaces_ branch from 78fba4a to 60d6c90 Compare September 26, 2024 03:35
@camchenry camchenry force-pushed the 09-25-refactor_linter_use_regex_visitor_in_no-useless-escape_ branch from 8d137b0 to 149a4f8 Compare September 26, 2024 03:40
@camchenry camchenry force-pushed the 09-25-refactor_linter_use_regex_visitor_in_no-regex-spaces_ branch from 60d6c90 to f5429b8 Compare September 26, 2024 03:41
@Boshen Boshen force-pushed the 09-25-refactor_linter_use_regex_visitor_in_no-useless-escape_ branch from 149a4f8 to 8d280b4 Compare September 26, 2024 05:10
@Boshen Boshen force-pushed the 09-25-refactor_linter_use_regex_visitor_in_no-regex-spaces_ branch from f5429b8 to 68f89ed Compare September 26, 2024 05:11
@Boshen Boshen force-pushed the 09-25-refactor_linter_use_regex_visitor_in_no-useless-escape_ branch from 8d280b4 to a52fdb3 Compare September 26, 2024 06:00
@Boshen Boshen force-pushed the 09-25-refactor_linter_use_regex_visitor_in_no-regex-spaces_ branch from 68f89ed to a9800e6 Compare September 26, 2024 06:01
@camchenry camchenry force-pushed the 09-25-refactor_linter_use_regex_visitor_in_no-useless-escape_ branch from a52fdb3 to 82328c7 Compare September 27, 2024 15:21
@camchenry camchenry force-pushed the 09-25-refactor_linter_use_regex_visitor_in_no-regex-spaces_ branch 2 times, most recently from 938ab4b to 9d8778c Compare September 27, 2024 15:44
@camchenry camchenry marked this pull request as ready for review September 27, 2024 15:47
@Boshen Boshen added the 0-merge Merge with Graphite Merge Queue label Sep 27, 2024
Copy link

graphite-app bot commented Sep 27, 2024

Merge activity

  • Sep 27, 11:58 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 27, 11:58 AM EDT: Boshen added this pull request to the Graphite merge queue.
  • Sep 27, 12:07 PM EDT: Boshen merged this pull request with the Graphite merge queue.

Similar to previous PRs, this refactors the `no-regex-spaces` rule to use the RegExp AST visitor, rather than the handwritten implementation in this rule. This makes the rule much simpler and easier to maintain in the future.
@Boshen Boshen force-pushed the 09-25-refactor_linter_use_regex_visitor_in_no-useless-escape_ branch from 82328c7 to 0d44cf7 Compare September 27, 2024 15:59
@Boshen Boshen force-pushed the 09-25-refactor_linter_use_regex_visitor_in_no-regex-spaces_ branch from 9d8778c to 9d5b44a Compare September 27, 2024 16:00
Base automatically changed from 09-25-refactor_linter_use_regex_visitor_in_no-useless-escape_ to main September 27, 2024 16:05
@graphite-app graphite-app bot merged commit 9d5b44a into main Sep 27, 2024
27 checks passed
@graphite-app graphite-app bot deleted the 09-25-refactor_linter_use_regex_visitor_in_no-regex-spaces_ branch September 27, 2024 16:07
@oxc-bot oxc-bot mentioned this pull request Oct 7, 2024
@oxc-bot oxc-bot mentioned this pull request Oct 7, 2024
Boshen added a commit that referenced this pull request Oct 8, 2024
## [0.9.10] - 2024-10-07

### Features

- f272137 editors/vscode: Clear diagnostics on file deletion (#6326)
(dalaoshu)
- 1a5f293 editors/vscode: Update VSCode extention to use project's
language server (#6132) (dalaoshu)
- 376cc09 linter: Implement `no-throw-literal` (#6144) (dalaoshu)
- 5957214 linter: Allow fixing in files with source offsets (#6197)
(camchenry)
- a089e19 linter: Eslint/no-else-return (#4305) (yoho)
- 183739f linter: Implement prefer-await-to-callbacks (#6153) (dalaoshu)
- ae539af linter: Implement no-return-assign (#6108) (Radu Baston)

### Bug Fixes

- 9e9808b linter: Fix regression when parsing ts in vue files (#6336)
(Boshen)
- 93c6db6 linter: Improve docs and diagnostics message for
no-else-return (#6327) (DonIsaac)
- e0a3378 linter: Correct false positive in
`unicorn/prefer-string-replace-all` (#6263) (H11)
- ea28ee9 linter: Improve the fixer of `prefer-namespace-keyword`
(#6230) (dalaoshu)
- f6a3450 linter: Get correct source offsets for astro files (#6196)
(camchenry)
- be0030c linter: Allow whitespace control characters in
`no-control-regex` (#6140) (camchenry)
- e7e8ead linter: False positive in `no-return-assign` (#6128)
(DonIsaac)

### Performance

- ac0a82a linter: Reuse allocator when there are multiple source texts
(#6337) (Boshen)
- 50a0029 linter: Do not concat vec in `no-useless-length-check` (#6276)
(camchenry)

### Documentation

- 7ca70dd linter: Add docs for `ContextHost` and `LintContext` (#6272)
(camchenry)
- a949ecb linter: Improve docs for `eslint/getter-return` (#6229)
(DonIsaac)
- 14ba263 linter: Improve docs for `eslint-plugin-import` rules (#6131)
(dalaoshu)

### Refactor

- 642725c linter: Rename vars from `ast_node_id` to `node_id` (#6305)
(overlookmotel)
- 8413175 linter: Move shared function from utils to rule (#6127)
(dalaoshu)
- ba9c372 linter: Make jest/vitest rule mapping more clear (#6273)
(camchenry)
- 82b8f21 linter: Add schemars and serde traits to AllowWarnDeny and
RuleCategories (#6119) (DonIsaac)
- ea908f7 linter: Consolidate file loading logic (#6130) (DonIsaac)
- db751f0 linter: Use regexp AST visitor in `no-control-regex` (#6129)
(camchenry)
- 3aa7e42 linter: Use RegExp AST visitor for `no-hex-escape` (#6117)
(camchenry)
- 9d5b44a linter: Use regex visitor in `no-regex-spaces` (#6063)
(camchenry)
- 0d44cf7 linter: Use regex visitor in `no-useless-escape` (#6062)
(camchenry)
- eeb8873 linter: Use regex visitor in `no-empty-character-class`
(#6058) (camchenry)

### Testing

- d883562 linter: Invalid `eslint/no-unused-vars` options (#6228)
(DonIsaac)

---------

Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
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.

2 participants