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

Update no-then.md #503

Merged
merged 3 commits into from Feb 5, 2024
Merged

Update no-then.md #503

merged 3 commits into from Feb 5, 2024

Conversation

cefn
Copy link
Contributor

@cefn cefn commented Feb 3, 2024

The 'improved code' after linting was unnecessarily complex introducing a named variable across multiple lines for no reason which made it look better to keep using then. A bit surprising.

Previous catch example was code which didn't differentiate between failing case (which is now a deliberate null) and undefined case (which is often the result of an error).

Also the previous catch example was the only example for a rule which is called 'no-then' and therefore the failing example didn't use 'then' either.

The 'improved code' after linting was unnecessarily complex introducing a named variable across multiple lines for no reason which made it look better to keep using `then`. A bit surprising.

Previous catch example was code which didn't differentiate between failing case (which is now a deliberate null) and undefined case (which is often the result of an error).
@cefn cefn requested a review from a team as a code owner February 3, 2024 10:51
@cefn cefn requested a review from mattcosta7 February 3, 2024 10:51
Copy link
Contributor

@theinterned theinterned left a comment

Choose a reason for hiding this comment

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

Thank you. I agree these examples are an improvement!

docs/rules/no-then.md Outdated Show resolved Hide resolved
@theinterned theinterned merged commit 2a7beb4 into github:main Feb 5, 2024
3 checks passed
mergify bot pushed a commit to Balvajs/delete-stale-branches that referenced this pull request Mar 1, 2024
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[eslint-plugin-github](https://togithub.com/github/eslint-plugin-github)
| devDependencies | patch | [`4.10.1` ->
`4.10.2`](https://renovatebot.com/diffs/npm/eslint-plugin-github/4.10.1/4.10.2)
|

---

### Release Notes

<details>
<summary>github/eslint-plugin-github (eslint-plugin-github)</summary>

###
[`v4.10.2`](https://togithub.com/github/eslint-plugin-github/releases/tag/v4.10.2)

[Compare
Source](https://togithub.com/github/eslint-plugin-github/compare/v4.10.1...v4.10.2)

#### What's Changed

##### Functionality

- Update no-then.md by [@&#8203;cefn](https://togithub.com/cefn) in
[github/eslint-plugin-github#503
- fix `a11y-svg-has-accessible-name` considering whitespace JSXText by
[@&#8203;nnmrts](https://togithub.com/nnmrts) in
[github/eslint-plugin-github#508

##### Dependancy updates

- chore(deps): bump the all-dependencies group with 3 updates by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[github/eslint-plugin-github#482
- chore(deps): bump the all-dependencies group with 3 updates by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[github/eslint-plugin-github#484
- chore(deps): bump the all-dependencies group with 3 updates by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[github/eslint-plugin-github#485
- chore(deps): bump the all-dependencies group with 4 updates by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[github/eslint-plugin-github#486
- chore(deps): bump the all-dependencies group with 3 updates by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[github/eslint-plugin-github#487
- chore(deps): bump the all-dependencies group with 3 updates by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[github/eslint-plugin-github#489
- chore(deps): bump actions/setup-node from 3 to 4 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[github/eslint-plugin-github#488
- chore(deps): bump the all-dependencies group with 5 updates by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[github/eslint-plugin-github#490
- chore(deps): bump the all-dependencies group with 2 updates by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[github/eslint-plugin-github#491
- chore(deps): bump the all-dependencies group with 5 updates by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[github/eslint-plugin-github#492
- chore(deps): bump the all-dependencies group with 2 updates by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[github/eslint-plugin-github#493
- chore(deps): bump the all-dependencies group with 4 updates by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[github/eslint-plugin-github#494
- chore(deps): bump the all-dependencies group with 3 updates by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[github/eslint-plugin-github#495
- chore(deps): bump the all-dependencies group with 5 updates by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[github/eslint-plugin-github#496
- chore(deps): bump the all-dependencies group with 4 updates by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[github/eslint-plugin-github#498
- chore(deps): bump the all-dependencies group with 2 updates by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[github/eslint-plugin-github#499
- chore(deps): bump the all-dependencies group with 5 updates by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[github/eslint-plugin-github#500
- chore(deps): bump the all-dependencies group with 3 updates by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[github/eslint-plugin-github#501
- chore(deps): bump the all-dependencies group with 3 updates by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[github/eslint-plugin-github#502
- chore(deps): bump the all-dependencies group with 3 updates by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[github/eslint-plugin-github#504
- chore(deps): bump the all-dependencies group with 5 updates by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[github/eslint-plugin-github#507
- chore(deps): bump the all-dependencies group with 3 updates by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[github/eslint-plugin-github#509

#### New Contributors

- [@&#8203;cefn](https://togithub.com/cefn) made their first
contribution in
[github/eslint-plugin-github#503
- [@&#8203;nnmrts](https://togithub.com/nnmrts) made their first
contribution in
[github/eslint-plugin-github#508

**Full Changelog**:
github/eslint-plugin-github@v4.10.1...v4.10.2

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, 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 has been generated by [Renovate
Bot](https://togithub.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yMjEuMCIsInVwZGF0ZWRJblZlciI6IjM3LjIyMS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: Balvajs Renovate Bot <406530+balvajs-renovate[bot]@users.noreply.github.com>
mergify bot pushed a commit to Balvajs/dismiss-stale-reviews that referenced this pull request Mar 1, 2024
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[eslint-plugin-github](https://togithub.com/github/eslint-plugin-github)
| devDependencies | patch | [`4.10.1` ->
`4.10.2`](https://renovatebot.com/diffs/npm/eslint-plugin-github/4.10.1/4.10.2)
|

---

### Release Notes

<details>
<summary>github/eslint-plugin-github (eslint-plugin-github)</summary>

###
[`v4.10.2`](https://togithub.com/github/eslint-plugin-github/releases/tag/v4.10.2)

[Compare
Source](https://togithub.com/github/eslint-plugin-github/compare/v4.10.1...v4.10.2)

#### What's Changed

##### Functionality

- Update no-then.md by [@&#8203;cefn](https://togithub.com/cefn) in
[github/eslint-plugin-github#503
- fix `a11y-svg-has-accessible-name` considering whitespace JSXText by
[@&#8203;nnmrts](https://togithub.com/nnmrts) in
[github/eslint-plugin-github#508

##### Dependancy updates

- chore(deps): bump the all-dependencies group with 3 updates by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[github/eslint-plugin-github#482
- chore(deps): bump the all-dependencies group with 3 updates by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[github/eslint-plugin-github#484
- chore(deps): bump the all-dependencies group with 3 updates by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[github/eslint-plugin-github#485
- chore(deps): bump the all-dependencies group with 4 updates by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[github/eslint-plugin-github#486
- chore(deps): bump the all-dependencies group with 3 updates by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[github/eslint-plugin-github#487
- chore(deps): bump the all-dependencies group with 3 updates by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[github/eslint-plugin-github#489
- chore(deps): bump actions/setup-node from 3 to 4 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[github/eslint-plugin-github#488
- chore(deps): bump the all-dependencies group with 5 updates by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[github/eslint-plugin-github#490
- chore(deps): bump the all-dependencies group with 2 updates by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[github/eslint-plugin-github#491
- chore(deps): bump the all-dependencies group with 5 updates by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[github/eslint-plugin-github#492
- chore(deps): bump the all-dependencies group with 2 updates by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[github/eslint-plugin-github#493
- chore(deps): bump the all-dependencies group with 4 updates by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[github/eslint-plugin-github#494
- chore(deps): bump the all-dependencies group with 3 updates by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[github/eslint-plugin-github#495
- chore(deps): bump the all-dependencies group with 5 updates by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[github/eslint-plugin-github#496
- chore(deps): bump the all-dependencies group with 4 updates by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[github/eslint-plugin-github#498
- chore(deps): bump the all-dependencies group with 2 updates by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[github/eslint-plugin-github#499
- chore(deps): bump the all-dependencies group with 5 updates by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[github/eslint-plugin-github#500
- chore(deps): bump the all-dependencies group with 3 updates by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[github/eslint-plugin-github#501
- chore(deps): bump the all-dependencies group with 3 updates by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[github/eslint-plugin-github#502
- chore(deps): bump the all-dependencies group with 3 updates by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[github/eslint-plugin-github#504
- chore(deps): bump the all-dependencies group with 5 updates by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[github/eslint-plugin-github#507
- chore(deps): bump the all-dependencies group with 3 updates by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[github/eslint-plugin-github#509

#### New Contributors

- [@&#8203;cefn](https://togithub.com/cefn) made their first
contribution in
[github/eslint-plugin-github#503
- [@&#8203;nnmrts](https://togithub.com/nnmrts) made their first
contribution in
[github/eslint-plugin-github#508

**Full Changelog**:
github/eslint-plugin-github@v4.10.1...v4.10.2

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, 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 has been generated by [Renovate
Bot](https://togithub.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yMjEuMCIsInVwZGF0ZWRJblZlciI6IjM3LjIyMS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: Balvajs Renovate Bot <406530+balvajs-renovate[bot]@users.noreply.github.com>
renovate bot added a commit to WtfJoke/setup-tectonic that referenced this pull request Mar 4, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[eslint-plugin-github](https://togithub.com/github/eslint-plugin-github)
| [`4.10.1` ->
`4.10.2`](https://renovatebot.com/diffs/npm/eslint-plugin-github/4.10.1/4.10.2)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/eslint-plugin-github/4.10.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/eslint-plugin-github/4.10.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/eslint-plugin-github/4.10.1/4.10.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/eslint-plugin-github/4.10.1/4.10.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>github/eslint-plugin-github (eslint-plugin-github)</summary>

###
[`v4.10.2`](https://togithub.com/github/eslint-plugin-github/releases/tag/v4.10.2)

[Compare
Source](https://togithub.com/github/eslint-plugin-github/compare/v4.10.1...v4.10.2)

#### What's Changed

##### Functionality

- Update no-then.md by [@&#8203;cefn](https://togithub.com/cefn) in
[github/eslint-plugin-github#503
- fix `a11y-svg-has-accessible-name` considering whitespace JSXText by
[@&#8203;nnmrts](https://togithub.com/nnmrts) in
[github/eslint-plugin-github#508

##### Dependancy updates

- chore(deps): bump the all-dependencies group with 3 updates by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[github/eslint-plugin-github#482
- chore(deps): bump the all-dependencies group with 3 updates by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[github/eslint-plugin-github#484
- chore(deps): bump the all-dependencies group with 3 updates by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[github/eslint-plugin-github#485
- chore(deps): bump the all-dependencies group with 4 updates by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[github/eslint-plugin-github#486
- chore(deps): bump the all-dependencies group with 3 updates by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[github/eslint-plugin-github#487
- chore(deps): bump the all-dependencies group with 3 updates by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[github/eslint-plugin-github#489
- chore(deps): bump actions/setup-node from 3 to 4 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[github/eslint-plugin-github#488
- chore(deps): bump the all-dependencies group with 5 updates by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[github/eslint-plugin-github#490
- chore(deps): bump the all-dependencies group with 2 updates by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[github/eslint-plugin-github#491
- chore(deps): bump the all-dependencies group with 5 updates by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[github/eslint-plugin-github#492
- chore(deps): bump the all-dependencies group with 2 updates by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[github/eslint-plugin-github#493
- chore(deps): bump the all-dependencies group with 4 updates by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[github/eslint-plugin-github#494
- chore(deps): bump the all-dependencies group with 3 updates by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[github/eslint-plugin-github#495
- chore(deps): bump the all-dependencies group with 5 updates by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[github/eslint-plugin-github#496
- chore(deps): bump the all-dependencies group with 4 updates by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[github/eslint-plugin-github#498
- chore(deps): bump the all-dependencies group with 2 updates by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[github/eslint-plugin-github#499
- chore(deps): bump the all-dependencies group with 5 updates by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[github/eslint-plugin-github#500
- chore(deps): bump the all-dependencies group with 3 updates by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[github/eslint-plugin-github#501
- chore(deps): bump the all-dependencies group with 3 updates by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[github/eslint-plugin-github#502
- chore(deps): bump the all-dependencies group with 3 updates by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[github/eslint-plugin-github#504
- chore(deps): bump the all-dependencies group with 5 updates by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[github/eslint-plugin-github#507
- chore(deps): bump the all-dependencies group with 3 updates by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[github/eslint-plugin-github#509

#### New Contributors

- [@&#8203;cefn](https://togithub.com/cefn) made their first
contribution in
[github/eslint-plugin-github#503
- [@&#8203;nnmrts](https://togithub.com/nnmrts) made their first
contribution in
[github/eslint-plugin-github#508

**Full Changelog**:
github/eslint-plugin-github@v4.10.1...v4.10.2

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 4am on Monday" in timezone
Europe/Berlin, Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, 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 has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/WtfJoke/setup-tectonic).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yMjAuMiIsInVwZGF0ZWRJblZlciI6IjM3LjIyMC4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants