Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix(typescript-estree): disallow binding patterns in parameter properties#11760

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

@dbarabashh
Copy link
Contributor

@dbarabashhdbarabashh commentedNov 14, 2025
edited
Loading

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 onhttps://opencollective.com/typescript-eslint.

@netlify
Copy link

netlifybot commentedNov 14, 2025
edited
Loading

Deploy Preview fortypescript-eslint ready!

NameLink
🔨 Latest commited93f1c
🔍 Latest deploy loghttps://app.netlify.com/projects/typescript-eslint/deploys/69245dcc3bcf750008b9b03c
😎 Deploy Previewhttps://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 yourNetlify project configuration.

@nx-cloud
Copy link

nx-cloudbot commentedNov 14, 2025
edited
Loading

View yourCI Pipeline Execution ↗ for commited93f1c

CommandStatusDurationResult
nx test eslint-plugin --coverage=false✅ Succeeded5m 12sView ↗
nx run-many -t lint✅ Succeeded3m 15sView ↗
nx run-many -t typecheck✅ Succeeded2m 25sView ↗
nx test typescript-estree --coverage=false✅ Succeeded21sView ↗
nx run types:build✅ Succeeded2sView ↗
nx run generate-configs✅ Succeeded6sView ↗
nx test eslint-plugin-internal --coverage=false✅ Succeeded10sView ↗
nx run integration-tests:test✅ Succeeded3sView ↗
Additional runs (29)✅ Succeeded...View ↗

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

@dbarabashhdbarabashh marked this pull request as draftNovember 14, 2025 18:24
@dbarabashhdbarabashhforce-pushed thefix-invalid-parameter-properties branch fromc524799 to5c6e3dfCompareNovember 14, 2025 19:01
@codecov
Copy link

codecovbot commentedNov 14, 2025
edited
Loading

Codecov Report

❌ Patch coverage is28.57143% with20 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 linesPatch %Lines
packages/typescript-estree/src/check-modifiers.ts0.00%16 Missing⚠️
...-plugin/src/rules/explicit-member-accessibility.ts0.00%1 Missing⚠️
...es/eslint-plugin/src/rules/parameter-properties.ts0.00%1 Missing⚠️
...s/eslint-plugin/src/util/collectUnusedVariables.ts66.66%1 Missing⚠️
packages/typescript-estree/src/convert.ts0.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 thetarget 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
FlagCoverage Δ
unittest90.50% <28.57%> (-0.02%)⬇️

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

Files with missing linesCoverage Δ
...es/no-unnecessary-parameter-property-assignment.ts98.93% <100.00%> (-0.01%)⬇️
...c/util/class-scope-analyzer/extractComputedName.ts71.64% <100.00%> (+6.30%)⬆️
...-plugin/src/rules/explicit-member-accessibility.ts99.05% <0.00%> (-0.02%)⬇️
...es/eslint-plugin/src/rules/parameter-properties.ts98.42% <0.00%> (-0.05%)⬇️
...s/eslint-plugin/src/util/collectUnusedVariables.ts96.56% <66.66%> (+0.37%)⬆️
packages/typescript-estree/src/convert.ts31.07% <0.00%> (ø)
packages/typescript-estree/src/check-modifiers.ts15.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.

@dbarabashhdbarabashh marked this pull request as ready for reviewNovember 14, 2025 20:44
@JoshuaKGoldberg
Copy link
Member

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

Copy link
Member

@JoshuaKGoldbergJoshuaKGoldberg 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.

@JoshuaKGoldbergJoshuaKGoldberg added the awaiting responseIssues waiting for a reply from the OP or another party labelNov 17, 2025
@dbarabashh
Copy link
ContributorAuthor

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

@github-actionsgithub-actionsbot removed the awaiting responseIssues waiting for a reply from the OP or another party labelNov 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.

dbarabashh reacted with heart emoji

@JamesHenry
Copy link
Member

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

  • Removed the oldSKIP_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
JoshuaKGoldberg reacted with rocket emoji

@github-actions

This comment was marked as resolved.

@dbarabashh
Copy link
ContributorAuthor

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

@bradzacherbradzacher changed the titlefeat(typescript-estree): disallow binding patterns in parameter propertiesfix(typescript-estree): disallow binding patterns in parameter propertiesNov 23, 2025
@bradzacherbradzacher added the 1 approval>=1 team member has approved this PR; we're now leaving it open for more reviews before we merge labelNov 23, 2025
@JoshuaKGoldbergJoshuaKGoldberg merged commit5f04910 intotypescript-eslint:mainNov 24, 2025
63 checks passed
renovatebot added a commit to andrei-picus-tink/auto-renovate that referenced this pull requestNov 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.
renovatebot added a commit to andrei-picus-tink/auto-renovate that referenced this pull requestNov 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.
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@bradzacherbradzacherbradzacher approved these changes

@JamesHenryJamesHenryAwaiting requested review from JamesHenry

@JoshuaKGoldbergJoshuaKGoldbergAwaiting requested review from JoshuaKGoldberg

Assignees

No one assigned

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

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Enhancement: throw an error for invalidTSParameterPropertys

4 participants

@dbarabashh@JoshuaKGoldberg@JamesHenry@bradzacher

[8]ページ先頭

©2009-2025 Movatter.jp