Skip to content

feat(linter): add fixer for no-single-promise-in-promise-methods#3531

Merged
Boshen merged 4 commits intomainfrom
don/up/linter/no_single_promise_in_promise_methods_fixer
Jun 5, 2024
Merged

feat(linter): add fixer for no-single-promise-in-promise-methods#3531
Boshen merged 4 commits intomainfrom
don/up/linter/no_single_promise_in_promise_methods_fixer

Conversation

@DonIsaac
Copy link
Contributor

@DonIsaac DonIsaac commented Jun 4, 2024

Fixes look like this:

let fix = vec![
    ("Promise.all([null]).then()", "Promise.resolve(null).then()", None),
    ("let x = await Promise.all([foo()])", "let x = await foo()", None),
    ("let x = await (Promise.all([foo()]))", "let x = await (foo())", None),
];

@DonIsaac DonIsaac added C-enhancement Category - New feature or request A-linter Area - Linter labels Jun 4, 2024
@DonIsaac DonIsaac self-assigned this Jun 4, 2024
@graphite-app
Copy link
Contributor

graphite-app bot commented Jun 4, 2024

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

Add 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.

@codspeed-hq
Copy link

codspeed-hq bot commented Jun 4, 2024

CodSpeed Performance Report

Merging #3531 will degrade performances by 8.19%

Comparing don/up/linter/no_single_promise_in_promise_methods_fixer (368bec1) with don/up/linter/no_single_promise_in_promise_methods_fixer (ed2f10a)

Summary

❌ 2 regressions
✅ 20 untouched benchmarks

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

Benchmarks breakdown

Benchmark don/up/linter/no_single_promise_in_promise_methods_fixer don/up/linter/no_single_promise_in_promise_methods_fixer Change
transformer[RadixUIAdoptionSection.jsx] 260.9 µs 284.2 µs -8.19%
transformer[cal.com.tsx] 94.5 ms 101.5 ms -6.84%

@Boshen Boshen changed the title up(linter): add fixer for no-single-promise-in-promise-methods feat(linter): add fixer for no-single-promise-in-promise-methods Jun 5, 2024
@Boshen Boshen merged commit 6506d08 into main Jun 5, 2024
@Boshen Boshen deleted the don/up/linter/no_single_promise_in_promise_methods_fixer branch June 5, 2024 17:40
Boshen added a commit that referenced this pull request Jun 7, 2024
## [0.4.3] - 2024-06-07

### Features

- 1fb9d23 linter: Add fixer for no-useless-fallback-in-spread rule
(#3544) (Don Isaac)
- 6506d08 linter: Add fixer for no-single-promise-in-promise-methods
(#3531) (Don Isaac)
- daf559f linter: Eslint-plugin-jest/no-large-snapshot (#3436) (cinchen)
- 4c17bc6 linter: Eslint/no-constructor-return (#3321) (谭光志)
- 4a075cc linter/jsdoc: Implement require-param rule (#3554) (Yuji
Sugiura)
- 747500a linter/jsdoc: Implement require-returns-type rule (#3458)
(Yuji Sugiura)
- 6b39654 linter/tree-shaking: Support options (#3504) (Wang Wenzhe)
- 0cdb45a oxc_codegen: Preserve annotate comment (#3465)
(IWANABETHATGUY)

### Bug Fixes

- b188778 linter/eslint: Fix `require-await` false positives in
`ForOfStatement`. (#3457) (rzvxa)
- 350cd91 parser: Should parser error when function declaration has no
name (#3461) (Dunqing)

Co-authored-by: Boshen <Boshen@users.noreply.github.com>
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.

2 participants