Skip to content

Conversation

@dbarabashh
Copy link
Contributor

@dbarabashh dbarabashh commented Nov 14, 2025

PR Checklist

Overview

This PR implements validation to block invalid parameter property patterns that typescript treats as semantic errors:

  • Array binding patterns: private [foo] = [1]
  • Object binding patterns: private { bar } = { bar: 1 }
  • Rest parameters: private ...baz

@typescript-eslint
Copy link
Contributor

Thanks for the PR, @dbarabashh!

typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community.

The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately.

Thanks again!


🙏 Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently on https://opencollective.com/typescript-eslint.

@netlify
Copy link

netlify bot commented Nov 14, 2025

Deploy Preview for typescript-eslint ready!

Name Link
🔨 Latest commit ed93f1c
🔍 Latest deploy log https://app.netlify.com/projects/typescript-eslint/deploys/69245dcc3bcf750008b9b03c
😎 Deploy Preview https://deploy-preview-11760--typescript-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 96 (🔴 down 1 from production)
Accessibility: 97 (no change from production)
Best Practices: 100 (no change from production)
SEO: 92 (no change from production)
PWA: 80 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@nx-cloud
Copy link

nx-cloud bot commented Nov 14, 2025

View your CI Pipeline Execution ↗ for commit ed93f1c

Command Status Duration Result
nx test eslint-plugin --coverage=false ✅ Succeeded 5m 12s View ↗
nx run-many -t lint ✅ Succeeded 3m 15s View ↗
nx run-many -t typecheck ✅ Succeeded 2m 25s View ↗
nx test typescript-estree --coverage=false ✅ Succeeded 21s View ↗
nx run types:build ✅ Succeeded 2s View ↗
nx run generate-configs ✅ Succeeded 6s View ↗
nx test eslint-plugin-internal --coverage=false ✅ Succeeded 10s View ↗
nx run integration-tests:test ✅ Succeeded 3s View ↗
Additional runs (29) ✅ Succeeded ... View ↗

☁️ Nx Cloud last updated this comment at 2025-11-24 13:50:21 UTC

@dbarabashh dbarabashh marked this pull request as draft November 14, 2025 18:24
@dbarabashh dbarabashh force-pushed the fix-invalid-parameter-properties branch from c524799 to 5c6e3df Compare November 14, 2025 19:01
@codecov
Copy link

codecov bot commented Nov 14, 2025

Codecov Report

❌ Patch coverage is 28.57143% with 20 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.50%. Comparing base (78858ee) to head (ed93f1c).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
packages/typescript-estree/src/check-modifiers.ts 0.00% 16 Missing ⚠️
...-plugin/src/rules/explicit-member-accessibility.ts 0.00% 1 Missing ⚠️
...es/eslint-plugin/src/rules/parameter-properties.ts 0.00% 1 Missing ⚠️
...s/eslint-plugin/src/util/collectUnusedVariables.ts 66.66% 1 Missing ⚠️
packages/typescript-estree/src/convert.ts 0.00% 1 Missing ⚠️

❌ Your patch status has failed because the patch coverage (28.57%) is below the target coverage (90.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #11760      +/-   ##
==========================================
- Coverage   90.52%   90.50%   -0.02%     
==========================================
  Files         522      522              
  Lines       53353    53344       -9     
  Branches     8921     8910      -11     
==========================================
- Hits        48296    48280      -16     
- Misses       5040     5047       +7     
  Partials       17       17              
Flag Coverage Δ
unittest 90.50% <28.57%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...es/no-unnecessary-parameter-property-assignment.ts 98.93% <100.00%> (-0.01%) ⬇️
...c/util/class-scope-analyzer/extractComputedName.ts 71.64% <100.00%> (+6.30%) ⬆️
...-plugin/src/rules/explicit-member-accessibility.ts 99.05% <0.00%> (-0.02%) ⬇️
...es/eslint-plugin/src/rules/parameter-properties.ts 98.42% <0.00%> (-0.05%) ⬇️
...s/eslint-plugin/src/util/collectUnusedVariables.ts 96.56% <66.66%> (+0.37%) ⬆️
packages/typescript-estree/src/convert.ts 31.07% <0.00%> (ø)
packages/typescript-estree/src/check-modifiers.ts 15.15% <0.00%> (-0.78%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dbarabashh dbarabashh marked this pull request as ready for review November 14, 2025 20:44
@JoshuaKGoldberg
Copy link
Member

🤔 I don't get these failures locally. Re-running...

Copy link
Member

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Choose a reason for hiding this comment

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

A good start! I appreciate you removing the syntactically invalid tests from eslint-plugin.

@JoshuaKGoldberg JoshuaKGoldberg added the awaiting response Issues waiting for a reply from the OP or another party label Nov 17, 2025
@dbarabashh
Copy link
Contributor Author

@JoshuaKGoldberg can you help with github actions? I can't reproduce this locally. Locally everything passes and everything is ok

@github-actions github-actions bot removed the awaiting response Issues waiting for a reply from the OP or another party label Nov 17, 2025
@JoshuaKGoldberg
Copy link
Member

Blurgh, yes, I also don't reproduce them locally. We can ignore them in this PR for now - let's just pretend the build is passing. In parallel I'll try to clear the Nx cache and work with @JamesHenry on #11593.

@JamesHenry
Copy link
Member

I did two items of repo housekeeping to resolve the CI build issue:

  • Removed the old SKIP_AST_SPEC_REBUILD env var: c2ee584
    • Based on how it was being checked it was doing the opposite of what the name implied, and it was also imperatively triggering tasks nested inside the task graph which is always going to be a recipe for subtle issues
  • Fixed the project graph to accurately reflect the fact that the ast-spec is implicitly depended upon by essentially everything else: 348e7d7

Before

ast-spec was orphaned without any traced relationships, which clearly is not correct

image

After

ast-spec is appropriately one of the core nodes at the base of the graph

image

@github-actions

This comment was marked as resolved.

@dbarabashh
Copy link
Contributor Author

@JoshuaKGoldberg you left a comment here and I removed those tests but now there’s a problem with the coverage rate

@bradzacher bradzacher changed the title feat(typescript-estree): disallow binding patterns in parameter properties fix(typescript-estree): disallow binding patterns in parameter properties Nov 23, 2025
@bradzacher bradzacher added the 1 approval >=1 team member has approved this PR; we're now leaving it open for more reviews before we merge label Nov 23, 2025
@JoshuaKGoldberg JoshuaKGoldberg merged commit 5f04910 into typescript-eslint:main Nov 24, 2025
63 checks passed
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Nov 24, 2025
| datasource | package                          | from   | to     |
| ---------- | -------------------------------- | ------ | ------ |
| npm        | @typescript-eslint/eslint-plugin | 8.47.0 | 8.48.0 |
| npm        | @typescript-eslint/parser        | 8.47.0 | 8.48.0 |


## [v8.48.0](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#8480-2025-11-24)

##### 🚀 Features

- **eslint-plugin:** \[no-redundant-type-constituents] use assignability checking for redundancy checks ([#10744](typescript-eslint/typescript-eslint#10744))

##### 🩹 Fixes

- **typescript-estree:** disallow binding patterns in parameter properties ([#11760](typescript-eslint/typescript-eslint#11760))
- **eslint-plugin:** \[consistent-generic-constructors] ignore when constructor is  typed array ([#10477](typescript-eslint/typescript-eslint#10477))

##### ❤️ Thank You

- Dima Barabash [@dbarabashh](https://github.com/dbarabashh)
- JamesHenry [@JamesHenry](https://github.com/JamesHenry)
- Josh Goldberg
- mdm317 [@gen-ip-1](https://github.com/gen-ip-1)

You can read about our [versioning strategy](https://typescript-eslint.io/users/versioning) and [releases](https://typescript-eslint.io/users/releases) on our website.
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Nov 24, 2025
| datasource | package                          | from   | to     |
| ---------- | -------------------------------- | ------ | ------ |
| npm        | @typescript-eslint/eslint-plugin | 8.47.0 | 8.48.0 |
| npm        | @typescript-eslint/parser        | 8.47.0 | 8.48.0 |


## [v8.48.0](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#8480-2025-11-24)

##### 🚀 Features

- **eslint-plugin:** \[no-redundant-type-constituents] use assignability checking for redundancy checks ([#10744](typescript-eslint/typescript-eslint#10744))

##### 🩹 Fixes

- **typescript-estree:** disallow binding patterns in parameter properties ([#11760](typescript-eslint/typescript-eslint#11760))
- **eslint-plugin:** \[consistent-generic-constructors] ignore when constructor is  typed array ([#10477](typescript-eslint/typescript-eslint#10477))

##### ❤️ Thank You

- Dima Barabash [@dbarabashh](https://github.com/dbarabashh)
- JamesHenry [@JamesHenry](https://github.com/JamesHenry)
- Josh Goldberg
- mdm317 [@gen-ip-1](https://github.com/gen-ip-1)

You can read about our [versioning strategy](https://typescript-eslint.io/users/versioning) and [releases](https://typescript-eslint.io/users/releases) on our website.
ch4og pushed a commit to csmplay/mapban that referenced this pull request Dec 4, 2025
This PR contains the following updates:

| Package | Change | Age | Confidence |
|---|---|---|---|
| [@typescript-eslint/eslint-plugin](https://typescript-eslint.io/packages/eslint-plugin) ([source](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin)) | [`8.47.0` -> `8.48.1`](https://renovatebot.com/diffs/npm/@typescript-eslint%2feslint-plugin/8.47.0/8.48.1) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@typescript-eslint%2feslint-plugin/8.48.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@typescript-eslint%2feslint-plugin/8.47.0/8.48.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) |
| [@typescript-eslint/parser](https://typescript-eslint.io/packages/parser) ([source](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser)) | [`8.47.0` -> `8.48.1`](https://renovatebot.com/diffs/npm/@typescript-eslint%2fparser/8.47.0/8.48.1) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@typescript-eslint%2fparser/8.48.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@typescript-eslint%2fparser/8.47.0/8.48.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>typescript-eslint/typescript-eslint (@&#8203;typescript-eslint/eslint-plugin)</summary>

### [`v8.48.1`](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#8481-2025-12-02)

[Compare Source](typescript-eslint/typescript-eslint@v8.48.0...v8.48.1)

##### 🩹 Fixes

- **eslint-plugin:** \[restrict-template-expressions] check base types in allow list ([#&#8203;11764](typescript-eslint/typescript-eslint#11764), [#&#8203;11759](typescript-eslint/typescript-eslint#11759))
- **eslint-plugin:** honor ignored base types on generic classes ([#&#8203;11767](typescript-eslint/typescript-eslint#11767))
- **eslint-plugin:** \[consistent-type-exports] check value flag before resolving alias ([#&#8203;11769](typescript-eslint/typescript-eslint#11769))

##### ❤️ Thank You

- Josh Goldberg
- OleksandraKordonets
- SangheeSon [@&#8203;Higangssh](https://github.com/Higangssh)
- tao

You can read about our [versioning strategy](https://typescript-eslint.io/users/versioning) and [releases](https://typescript-eslint.io/users/releases) on our website.

### [`v8.48.0`](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#8480-2025-11-24)

[Compare Source](typescript-eslint/typescript-eslint@v8.47.0...v8.48.0)

##### 🚀 Features

- **eslint-plugin:** \[no-redundant-type-constituents] use assignability checking for redundancy checks ([#&#8203;10744](typescript-eslint/typescript-eslint#10744))

##### 🩹 Fixes

- **typescript-estree:** disallow binding patterns in parameter properties ([#&#8203;11760](typescript-eslint/typescript-eslint#11760))
- **eslint-plugin:** \[consistent-generic-constructors] ignore when constructor is  typed array ([#&#8203;10477](typescript-eslint/typescript-eslint#10477))

##### ❤️ Thank You

- Dima Barabash [@&#8203;dbarabashh](https://github.com/dbarabashh)
- JamesHenry [@&#8203;JamesHenry](https://github.com/JamesHenry)
- Josh Goldberg
- mdm317 [@&#8203;gen-ip-1](https://github.com/gen-ip-1)

You can read about our [versioning strategy](https://typescript-eslint.io/users/versioning) and [releases](https://typescript-eslint.io/users/releases) on our website.

</details>

<details>
<summary>typescript-eslint/typescript-eslint (@&#8203;typescript-eslint/parser)</summary>

### [`v8.48.1`](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/parser/CHANGELOG.md#8481-2025-12-02)

[Compare Source](typescript-eslint/typescript-eslint@v8.48.0...v8.48.1)

This was a version bump only for parser to align it with other projects, there were no code changes.

You can read about our [versioning strategy](https://typescript-eslint.io/users/versioning) and [releases](https://typescript-eslint.io/users/releases) on our website.

### [`v8.48.0`](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/parser/CHANGELOG.md#8480-2025-11-24)

[Compare Source](typescript-eslint/typescript-eslint@v8.47.0...v8.48.0)

This was a version bump only for parser to align it with other projects, there were no code changes.

You can read about our [versioning strategy](https://typescript-eslint.io/users/versioning) and [releases](https://typescript-eslint.io/users/releases) on our website.

</details>

---

### Configuration

📅 **Schedule**: 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 these updates again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi4xNC4yIiwidXBkYXRlZEluVmVyIjoiNDIuMTQuMiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Reviewed-on: https://git.csmpro.ru/csmpro/mapban/pulls/57
Co-authored-by: Renovate Bot <renovate@csmpro.ru>
Co-committed-by: Renovate Bot <renovate@csmpro.ru>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1 approval >=1 team member has approved this PR; we're now leaving it open for more reviews before we merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enhancement: throw an error for invalid TSParameterPropertys

4 participants