Skip to content

feat: report max-nested-callbacks violations at function head#20967

Merged
DMartens merged 1 commit into
mainfrom
feat/max-nested-callbacks-report-location
Jun 10, 2026
Merged

feat: report max-nested-callbacks violations at function head#20967
DMartens merged 1 commit into
mainfrom
feat/max-nested-callbacks-report-location

Conversation

@Pixel998

@Pixel998 Pixel998 commented Jun 9, 2026

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)
[x] Changes an existing rule (template)
[ ] Add autofix to a rule
[ ] Add a CLI option
[ ] Add something to the core
[ ] Other, please explain:

max-nested-callbacks limits how deeply callbacks can be nested. When the rule reports a violation, highlighting the entire callback can be noisy, especially when the callback body is large.

What changes did you make? (Give an overview)

Updated max-nested-callbacks so violations are reported on the function head instead of the full callback node.

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

@Pixel998
Pixel998 requested a review from a team as a code owner June 9, 2026 19:57
@github-project-automation github-project-automation Bot moved this to Needs Triage in Triage Jun 9, 2026
@eslint-github-bot eslint-github-bot Bot added the feature This change adds a new feature to ESLint label Jun 9, 2026
@github-actions github-actions Bot added the rule Relates to ESLint's core rules label Jun 9, 2026
@netlify

netlify Bot commented Jun 9, 2026

Copy link
Copy Markdown

Deploy Preview for docs-eslint canceled.

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

@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! Since this is a feat, leaving it open for a second review.

Marking as accepted since this change is consistent with the change we recently made in the complexity rule (#20048).

@mdjermanovic mdjermanovic added the accepted There is consensus among the team that this change meets the criteria for inclusion label Jun 10, 2026
@mdjermanovic mdjermanovic moved this from Needs Triage to Second Review Needed in Triage Jun 10, 2026

@DMartens DMartens left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Changes LGTM, thanks.

@DMartens
DMartens merged commit 732cb3e into main Jun 10, 2026
35 checks passed
@DMartens
DMartens deleted the feat/max-nested-callbacks-report-location branch June 10, 2026 21:53
@github-project-automation github-project-automation Bot moved this from Second Review Needed to Complete in Triage Jun 10, 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

accepted There is consensus among the team that this change meets the criteria for inclusion feature This change adds a new feature to ESLint rule Relates to ESLint's core rules

Projects

Status: Complete

Development

Successfully merging this pull request may close these issues.

3 participants