fix(eslint-plugin): [no-useless-default-assignment] reduce param index to ts this handling#11949
Conversation
The es tree node has the this parm in the signature while the ts nodes have explicit param for that.
|
Thanks for the PR, @chrros95! 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. |
✅ Deploy Preview for typescript-eslint ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
View your CI Pipeline Execution ↗ for commit e28434e
☁️ Nx Cloud last updated this comment at |
Codecov Report✅ All modified and coverable lines are covered by tests. Please upload reports for the commit e28434e to get more accurate results. Additional details and impacted files@@ Coverage Diff @@
## main #11949 +/- ##
==========================================
- Coverage 90.80% 90.73% -0.08%
==========================================
Files 531 527 -4
Lines 54637 53681 -956
Branches 9228 9027 -201
==========================================
- Hits 49611 48705 -906
+ Misses 5015 4963 -52
- Partials 11 13 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
| datasource | package | from | to | | ---------- | -------------------------------- | ------ | ------ | | npm | @typescript-eslint/eslint-plugin | 8.54.0 | 8.55.0 | | npm | @typescript-eslint/parser | 8.54.0 | 8.55.0 | ## [v8.55.0](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#8550-2026-02-09) ##### 🚀 Features - **utils:** deprecate defaultOptions in favor of meta.defaultOptions ([#11992](typescript-eslint/typescript-eslint#11992)) ##### 🩹 Fixes - **eslint-plugin:** \[no-useless-default-assignment] reduce param index to ts this handling ([#11949](typescript-eslint/typescript-eslint#11949)) - **eslint-plugin:** \[no-useless-default-assignment] report unnecessary defaults in ternary expressions ([#11984](typescript-eslint/typescript-eslint#11984)) - **eslint-plugin:** \[no-useless-default-assignment] require strictNullChecks ([#11966](typescript-eslint/typescript-eslint#11966), [#12000](typescript-eslint/typescript-eslint#12000)) - **eslint-plugin:** \[no-unused-vars] remove trailing newline when removing entire import ([#11990](typescript-eslint/typescript-eslint#11990)) ##### ❤️ Thank You - Christian Rose [@chrros95](https://github.com/chrros95) - Josh Goldberg - Maria Solano [@MariaSolOs](https://github.com/MariaSolOs) - Minyeong Kim [@minyeong981](https://github.com/minyeong981) - SungHyun627 [@SungHyun627](https://github.com/SungHyun627) - Yukihiro Hasegawa [@y-hsgw](https://github.com/y-hsgw) See [GitHub Releases](https://github.com/typescript-eslint/typescript-eslint/releases/tag/v8.55.0) for more information. You can read about our [versioning strategy](https://typescript-eslint.io/users/versioning) and [releases](https://typescript-eslint.io/users/releases) on our website.
| datasource | package | from | to | | ---------- | -------------------------------- | ------ | ------ | | npm | @typescript-eslint/eslint-plugin | 8.54.0 | 8.55.0 | | npm | @typescript-eslint/parser | 8.54.0 | 8.55.0 | ## [v8.55.0](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#8550-2026-02-09) ##### 🚀 Features - **utils:** deprecate defaultOptions in favor of meta.defaultOptions ([#11992](typescript-eslint/typescript-eslint#11992)) ##### 🩹 Fixes - **eslint-plugin:** \[no-useless-default-assignment] reduce param index to ts this handling ([#11949](typescript-eslint/typescript-eslint#11949)) - **eslint-plugin:** \[no-useless-default-assignment] report unnecessary defaults in ternary expressions ([#11984](typescript-eslint/typescript-eslint#11984)) - **eslint-plugin:** \[no-useless-default-assignment] require strictNullChecks ([#11966](typescript-eslint/typescript-eslint#11966), [#12000](typescript-eslint/typescript-eslint#12000)) - **eslint-plugin:** \[no-unused-vars] remove trailing newline when removing entire import ([#11990](typescript-eslint/typescript-eslint#11990)) ##### ❤️ Thank You - Christian Rose [@chrros95](https://github.com/chrros95) - Josh Goldberg - Maria Solano [@MariaSolOs](https://github.com/MariaSolOs) - Minyeong Kim [@minyeong981](https://github.com/minyeong981) - SungHyun627 [@SungHyun627](https://github.com/SungHyun627) - Yukihiro Hasegawa [@y-hsgw](https://github.com/y-hsgw) See [GitHub Releases](https://github.com/typescript-eslint/typescript-eslint/releases/tag/v8.55.0) for more information. You can read about our [versioning strategy](https://typescript-eslint.io/users/versioning) and [releases](https://typescript-eslint.io/users/releases) on our website.
| datasource | package | from | to | | ---------- | -------------------------------- | ------ | ------ | | npm | @typescript-eslint/eslint-plugin | 8.54.0 | 8.55.0 | | npm | @typescript-eslint/parser | 8.54.0 | 8.55.0 | ## [v8.55.0](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#8550-2026-02-09) ##### 🚀 Features - **utils:** deprecate defaultOptions in favor of meta.defaultOptions ([#11992](typescript-eslint/typescript-eslint#11992)) ##### 🩹 Fixes - **eslint-plugin:** \[no-useless-default-assignment] reduce param index to ts this handling ([#11949](typescript-eslint/typescript-eslint#11949)) - **eslint-plugin:** \[no-useless-default-assignment] report unnecessary defaults in ternary expressions ([#11984](typescript-eslint/typescript-eslint#11984)) - **eslint-plugin:** \[no-useless-default-assignment] require strictNullChecks ([#11966](typescript-eslint/typescript-eslint#11966), [#12000](typescript-eslint/typescript-eslint#12000)) - **eslint-plugin:** \[no-unused-vars] remove trailing newline when removing entire import ([#11990](typescript-eslint/typescript-eslint#11990)) ##### ❤️ Thank You - Christian Rose [@chrros95](https://github.com/chrros95) - Josh Goldberg - Maria Solano [@MariaSolOs](https://github.com/MariaSolOs) - Minyeong Kim [@minyeong981](https://github.com/minyeong981) - SungHyun627 [@SungHyun627](https://github.com/SungHyun627) - Yukihiro Hasegawa [@y-hsgw](https://github.com/y-hsgw) See [GitHub Releases](https://github.com/typescript-eslint/typescript-eslint/releases/tag/v8.55.0) for more information. You can read about our [versioning strategy](https://typescript-eslint.io/users/versioning) and [releases](https://typescript-eslint.io/users/releases) on our website.

PR Checklist
thisparameter and a default for an attribute of an object parameter #11948Overview
The es tree node has the this parameter in the signature param list, while the ts nodes have an explicit param for that.
So if the thisParameter is detected, the paramIndex is reduced to reflect this difference.