Skip to content

refactor: replace areAllSegmentsUnreachable with !isAnySegmentReachable#20951

Merged
mdjermanovic merged 1 commit into
eslint:mainfrom
kimtaejin3:refactor/dedupe-areAllSegmentsUnreachable
Jun 7, 2026
Merged

refactor: replace areAllSegmentsUnreachable with !isAnySegmentReachable#20951
mdjermanovic merged 1 commit into
eslint:mainfrom
kimtaejin3:refactor/dedupe-areAllSegmentsUnreachable

Conversation

@kimtaejin3

Copy link
Copy Markdown
Contributor

Prerequisites checklist

AI acknowledgment

  • I did not use AI to generate this PR.
  • (If the above is not checked) I have reviewed the AI-generated content before submitting.

What is the purpose of this pull request? (put an "X" next to an item)

[ ] Documentation update
[ ] Bug fix (template)
[ ] New rule (template)
[ ] Changes an existing rule (template)
[ ] Add autofix to a rule
[ ] Add a CLI option
[ ] Add something to the core
[x] Other, please explain: replace areAllSegmentsUnreachable with !isAnySegmentReachable

What changes did you make? (Give an overview)

This PR replaces the two areAllSegmentsUnreachable call sites with !isAnySegmentReachable and removes the local definitions, since they are logically equivalent.

Is there anything you'd like reviewers to focus on?

@kimtaejin3
kimtaejin3 requested a review from a team as a code owner June 7, 2026 06:25
@github-project-automation github-project-automation Bot moved this to Needs Triage in Triage Jun 7, 2026
@netlify

netlify Bot commented Jun 7, 2026

Copy link
Copy Markdown

Deploy Preview for docs-eslint canceled.

Name Link
🔨 Latest commit 762ff1b
🔍 Latest deploy log https://app.netlify.com/projects/docs-eslint/deploys/6a250ed10bab8e00080e34ae

@eslint-github-bot eslint-github-bot Bot added the chore This change is not user-facing label Jun 7, 2026
@github-actions github-actions Bot added the rule Relates to ESLint's core rules label Jun 7, 2026

@mdjermanovic mdjermanovic left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, thanks!

@mdjermanovic
mdjermanovic merged commit c2d1444 into eslint:main Jun 7, 2026
35 checks passed
@github-project-automation github-project-automation Bot moved this from Needs Triage to Complete in Triage Jun 7, 2026
John4064 pushed a commit to Doble-Technologies/MatchingMakingWebsite that referenced this pull request Jun 21, 2026
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [eslint](https://eslint.org) ([source](https://github.com/eslint/eslint)) | devDependencies | minor | [`10.4.1` → `10.5.0`](https://renovatebot.com/diffs/npm/eslint/10.4.1/10.5.0) |

---

### Release Notes

<details>
<summary>eslint/eslint (eslint)</summary>

### [`v10.5.0`](https://github.com/eslint/eslint/releases/tag/v10.5.0)

[Compare Source](eslint/eslint@v10.4.1...v10.5.0)

#### Features

- [`5ca8c52`](eslint/eslint@5ca8c52) feat: correct stack tracking in max-nested-callbacks ([#&#8203;20973](eslint/eslint#20973)) (Pixel998)
- [`b565783`](eslint/eslint@b565783) feat: report no-with violations at the with keyword ([#&#8203;20971](eslint/eslint#20971)) (Pixel998)
- [`2ce032f`](eslint/eslint@2ce032f) feat: report max-lines-per-function violations at function head ([#&#8203;20966](eslint/eslint#20966)) (Pixel998)
- [`732cb3e`](eslint/eslint@732cb3e) feat: report max-nested-callbacks violations at function head ([#&#8203;20967](eslint/eslint#20967)) (Pixel998)
- [`f9c138a`](eslint/eslint@f9c138a) feat: report max-depth violations on keywords ([#&#8203;20943](eslint/eslint#20943)) (Pixel998)
- [`bdb496c`](eslint/eslint@bdb496c) feat: correct max-depth handling for else-if chains ([#&#8203;20944](eslint/eslint#20944)) (Pixel998)
- [`c296873`](eslint/eslint@c296873) feat: update error loc in `max-statements` to function header ([#&#8203;20907](eslint/eslint#20907)) (Taejin Kim)

#### Documentation

- [`8ae1b5b`](eslint/eslint@8ae1b5b) docs: Update README (GitHub Actions Bot)
- [`ca7eb90`](eslint/eslint@ca7eb90) docs: update Node.js prerequisites to include ICU support ([#&#8203;20962](eslint/eslint#20962)) (Francesco Trotta)
- [`f99b47a`](eslint/eslint@f99b47a) docs: Update README (GitHub Actions Bot)
- [`acf03d4`](eslint/eslint@acf03d4) docs: clarify precedence of parserOptions over languageOptions ([#&#8203;20926](eslint/eslint#20926)) (sethamus)

#### Chores

- [`b18bf58`](eslint/eslint@b18bf58) chore: update ecosystem plugins ([#&#8203;20959](eslint/eslint#20959)) (ESLint Bot)
- [`c2d1444`](eslint/eslint@c2d1444) refactor: replace areAllSegmentsUnreachable with !isAnySegmentReachable ([#&#8203;20951](eslint/eslint#20951)) (Taejin Kim)
- [`243b8c5`](eslint/eslint@243b8c5) chore: enhance config-rule to support oneOf, anyOf, and nested schemas ([#&#8203;20788](eslint/eslint#20788)) (kuldeep kumar)
- [`217b2a9`](eslint/eslint@217b2a9) test: add unit tests for ParserService ([#&#8203;20949](eslint/eslint#20949)) (Taejin Kim)
- [`72003e7`](eslint/eslint@72003e7) test: add location information to error messages in `max-statements` ([#&#8203;20945](eslint/eslint#20945)) (lumir)
- [`7797c26`](eslint/eslint@7797c26) refactor: deduplicate isAnySegmentReachable across rules ([#&#8203;20890](eslint/eslint#20890)) (Taejin Kim)
- [`67c46fa`](eslint/eslint@67c46fa) chore: update ecosystem plugins ([#&#8203;20938](eslint/eslint#20938)) (ESLint Bot)
- [`95d8c7a`](eslint/eslint@95d8c7a) chore: update dependency [@&#8203;eslint/json](https://github.com/eslint/json) to v2 ([#&#8203;20934](eslint/eslint#20934)) (renovate\[bot])
- [`cf9e496`](eslint/eslint@cf9e496) chore: update [@&#8203;arethetypeswrong/cli](https://github.com/arethetypeswrong/cli) to 0.18.3 ([#&#8203;20933](eslint/eslint#20933)) (Pixel998)
- [`fb6d396`](eslint/eslint@fb6d396) test: run type tests with TypeScript 7 ([#&#8203;20868](eslint/eslint#20868)) (sethamus)

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **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://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yMzMuNCIsInVwZGF0ZWRJblZlciI6IjQzLjIzMy40IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: Renovate Bot <renovate@git.rcslabs.dev>
Reviewed-on: https://git.rcslabs.dev/Doble/MatchingMakingSite/pulls/44
Reviewed-by: mattdimegs <mdimeglio34@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore This change is not user-facing rule Relates to ESLint's core rules

Projects

Status: Complete

Development

Successfully merging this pull request may close these issues.

2 participants