Skip to content

feat(linter): Add "strict" option to promise/prefer-await-to-then rule#8674

Merged
camc314 merged 1 commit intooxc-project:mainfrom
NeilTheFisher:strict-await-to-then
Jan 23, 2025
Merged

feat(linter): Add "strict" option to promise/prefer-await-to-then rule#8674
camc314 merged 1 commit intooxc-project:mainfrom
NeilTheFisher:strict-await-to-then

Conversation

@NeilTheFisher
Copy link
Contributor

Implementation of the strict option specified in the eslint docs for promise/prefer-await-to-then

// Examples of **incorrect** code with `{ strict: true }`:
async function hi() {
  await thing().then(x => {})
}

@graphite-app
Copy link
Contributor

graphite-app bot commented Jan 23, 2025

How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

@github-actions github-actions bot added A-linter Area - Linter C-enhancement Category - New feature or request labels Jan 23, 2025
Copy link
Contributor

@camc314 camc314 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@codspeed-hq
Copy link

codspeed-hq bot commented Jan 23, 2025

CodSpeed Performance Report

Merging #8674 will not alter performance

Comparing NeilTheFisher:strict-await-to-then (23d1c3c) with main (878ce10)

Summary

✅ 32 untouched benchmarks

@camc314 camc314 merged commit dcaebe6 into oxc-project:main Jan 23, 2025
26 checks passed
Boshen added a commit that referenced this pull request Jan 24, 2025
## [0.15.8] - 2025-01-24

### Features

- 79ba9b5 linter: Added support to run in Node.JS legacy versions
(#8648) (Luiz Felipe Weber)
- dcaebe6 linter: Add "strict" option to `promise/prefer-await-to-then`
rule (#8674) (Neil Fisher)
- 4ae568e linter: Add DiagnosticResult to the Reporters for receiving a
sub part result (#8666) (Alexander S.)
- 8a0eb2a oxlint: Add stylish formatter (#8607) (Andrew Powell)

### Bug Fixes

- 40316af linter: Fix github `endColumn` output (#8647) (Alexander S.)
- dc912fa linter: Added missing $schema property to default config
(#8625) (Tapan Prakash)

### Refactor

- a3dc4c3 crates: Clean up snapshot files (#8680) (Boshen)
- e66da9f isolated_declarations, linter, minifier, prettier, semantic,
transformer: Remove unnecessary `ref` / `ref mut` syntax (#8643)
(overlookmotel)
- 23b49a6 linter: Use `cow_to_ascii_lowercase` instead
`cow_to_lowercase` (#8678) (Boshen)
- b8d9a51 span: Deal only in owned `Atom`s (#8641) (overlookmotel)
- ac4f98e span: Derive `Copy` on `Atom` (#8596) (branchseer)
- 259a47b vscode: Move commands and `findBinary` to separate files
(#8605) (Alexander S.)

Co-authored-by: Boshen <1430279+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