Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
fix(eslint-plugin): [prefer-for-of] fix false positive when using erasable type syntax within update expressions#10981
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
fix(eslint-plugin): [prefer-for-of] fix false positive when using erasable type syntax within update expressions#10981
Uh oh!
There was an error while loading.Please reload this page.
Conversation
…-null assertion within update expressions
Thanks for the PR,@zyoshoka! 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. |
netlifybot commentedMar 21, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
✅ Deploy Preview fortypescript-eslint ready!
To edit notification comments on pull requests, go to yourNetlify site configuration. |
nx-cloudbot commentedMar 21, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
View yourCI Pipeline Execution ↗ for commitc2c9d6a.
☁️Nx Cloud last updated this comment at |
codecovbot commentedMar 21, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@## main #10981 +/- ##==========================================+ Coverage 87.97% 87.99% +0.02%========================================== Files 470 470 Lines 16709 16712 +3 Branches 4710 4712 +2 ==========================================+ Hits 14699 14705 +6+ Misses 1664 1662 -2+ Partials 346 345 -1
Flags with carried forward coverage won't be shown.Click here to find out more.
🚀 New features to boost your workflow:
|
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Nice first PR to typescript-eslint! Looks great already, just minor touchups/enhancements requested! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
💯
5b187f4
intotypescript-eslint:mainUh oh!
There was an error while loading.Please reload this page.
| datasource | package | from | to || ---------- | -------------------------------- | ------ | ------ || npm | @typescript-eslint/eslint-plugin | 8.27.0 | 8.29.0 || npm | @typescript-eslint/parser | 8.27.0 | 8.29.0 |## [v8.29.0](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#8290-2025-03-31)##### 🚀 Features- **eslint-plugin:** \[prefer-nullish-coalescing] create `ignoreIfStatements` option ([#11000](typescript-eslint/typescript-eslint#11000))##### 🩹 Fixes- **eslint-plugin:** \[no-array-constructor] remove optional chaining exemption ([#10963](typescript-eslint/typescript-eslint#10963))- **eslint-plugin:** support arbitrary extensions in definition files ([#10957](typescript-eslint/typescript-eslint#10957))- **eslint-plugin:** \[prefer-for-of] fix false positive when using erasable type syntax within update expressions ([#10981](typescript-eslint/typescript-eslint#10981))- **eslint-plugin:** \[use-unknown-in-catch-callback-variable] remove fixable property ([#10993](typescript-eslint/typescript-eslint#10993))- **eslint-plugin:** \[no-unnecessary-condition] don't report on unnecessary optional array index access when `noUncheckedIndexedAccess` is enabled ([#10961](typescript-eslint/typescript-eslint#10961))##### ❤️ Thank You- Dima Barabash [@dbarabashh](https://github.com/dbarabashh)- Kim Sang Du [@developer-bandi](https://github.com/developer-bandi)- Olivier Zalmanski [@OlivierZal](https://github.com/OlivierZal)- Ronen Amiel- Yannick Decat [@mho22](https://github.com/mho22)- zyoshoka [@zyoshoka](https://github.com/zyoshoka)You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website.## [v8.28.0](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#8280-2025-03-24)##### 🚀 Features- **eslint-plugin:** \[prefer-nullish-coalescing] support `if` statement assignment (`??=`) and fix several minor bugs ([#10861](typescript-eslint/typescript-eslint#10861))##### 🩹 Fixes- **eslint-plugin:** \[no-unsafe-function-type] remove fixable property ([#10986](typescript-eslint/typescript-eslint#10986))##### ❤️ Thank You- Olivier Zalmanski [@OlivierZal](https://github.com/OlivierZal)- Yannick Decat [@mho22](https://github.com/mho22)You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website.
| datasource | package | from | to || ---------- | -------------------------------- | ------ | ------ || npm | @typescript-eslint/eslint-plugin | 8.27.0 | 8.29.0 || npm | @typescript-eslint/parser | 8.27.0 | 8.29.0 |## [v8.29.0](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#8290-2025-03-31)##### 🚀 Features- **eslint-plugin:** \[prefer-nullish-coalescing] create `ignoreIfStatements` option ([#11000](typescript-eslint/typescript-eslint#11000))##### 🩹 Fixes- **eslint-plugin:** \[no-array-constructor] remove optional chaining exemption ([#10963](typescript-eslint/typescript-eslint#10963))- **eslint-plugin:** support arbitrary extensions in definition files ([#10957](typescript-eslint/typescript-eslint#10957))- **eslint-plugin:** \[prefer-for-of] fix false positive when using erasable type syntax within update expressions ([#10981](typescript-eslint/typescript-eslint#10981))- **eslint-plugin:** \[use-unknown-in-catch-callback-variable] remove fixable property ([#10993](typescript-eslint/typescript-eslint#10993))- **eslint-plugin:** \[no-unnecessary-condition] don't report on unnecessary optional array index access when `noUncheckedIndexedAccess` is enabled ([#10961](typescript-eslint/typescript-eslint#10961))##### ❤️ Thank You- Dima Barabash [@dbarabashh](https://github.com/dbarabashh)- Kim Sang Du [@developer-bandi](https://github.com/developer-bandi)- Olivier Zalmanski [@OlivierZal](https://github.com/OlivierZal)- Ronen Amiel- Yannick Decat [@mho22](https://github.com/mho22)- zyoshoka [@zyoshoka](https://github.com/zyoshoka)You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website.## [v8.28.0](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#8280-2025-03-24)##### 🚀 Features- **eslint-plugin:** \[prefer-nullish-coalescing] support `if` statement assignment (`??=`) and fix several minor bugs ([#10861](typescript-eslint/typescript-eslint#10861))##### 🩹 Fixes- **eslint-plugin:** \[no-unsafe-function-type] remove fixable property ([#10986](typescript-eslint/typescript-eslint#10986))##### ❤️ Thank You- Olivier Zalmanski [@OlivierZal](https://github.com/OlivierZal)- Yannick Decat [@mho22](https://github.com/mho22)You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website.
…sable type syntax within update expressions (typescript-eslint#10981)* fix(eslint-plugin): [prefer-for-of] fix false positive when using non-null assertion within update expressions* fix(eslint-plugin): fix `isAssignee` function to handle any erasable type syntaxes
Uh oh!
There was an error while loading.Please reload this page.
PR Checklist
Overview
Fixed
isAssignee
function to handle erasable type syntax.