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(eslint-plugin): [array-type] autofix with conditional types needs parentheses#10522

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

Merged
JoshuaKGoldberg merged 3 commits intotypescript-eslint:mainfromlunedis:fix/array-filter-autofix-conditional-types
Dec 30, 2024
Merged

fix(eslint-plugin): [array-type] autofix with conditional types needs parentheses#10522

JoshuaKGoldberg merged 3 commits intotypescript-eslint:mainfromlunedis:fix/array-filter-autofix-conditional-types
Dec 30, 2024

Conversation

lunedis
Copy link
Contributor

PR Checklist

Overview

I added 3 new test cases that cover the auto-fix of the array-filter rule when used with conditional types. Afterwards I used the hint in the issue and added the typescript AST node "TSConditionalType" to the switch case which made the test case succeed.

I also linked my local typescript-eslint version using my package manager and check that it handles the original case in my code base, which made me open the issue, correctly.

Please feel free to provide feedback, this is my first contribution to typescript-eslint or such a big project at all for that matter.

ronami reacted with thumbs up emojironami reacted with heart emoji
@typescript-eslint
Copy link
Contributor

Thanks for the PR,@lunedis!

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.

@netlifyNetlify
Copy link

netlifybot commentedDec 19, 2024
edited
Loading

Deploy Preview fortypescript-eslint ready!

NameLink
🔨 Latest commit464854f
🔍 Latest deploy loghttps://app.netlify.com/sites/typescript-eslint/deploys/677111ca7158020008ba8e1b
😎 Deploy Previewhttps://deploy-preview-10522--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: 83 (🟢 up 10 from production)
Accessibility: 100 (no change from production)
Best Practices: 92 (no change from production)
SEO: 98 (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 site configuration.

@lunedislunedis changed the titlefix(eslint-plugin): [array-filter] autofix with conditional typesfix(eslint-plugin): [array-type] autofix with conditional typesDec 19, 2024
@nx-cloudNx Cloud
Copy link

nx-cloudbot commentedDec 19, 2024
edited
Loading

View yourCI Pipeline Execution ↗ for commit464854f.

CommandStatusDurationResult
nx run-many --target=build --exclude website --...✅ Succeeded2sView ↗
nx run-many --target=clean✅ Succeeded10sView ↗

☁️Nx Cloud last updated this comment at2024-12-29 20:03:07 UTC

Copy link
Member

@ronamironami left a comment

Choose a reason for hiding this comment

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

Looks good, nice! Thanks for sending this in! Just requesting minor changes around testing 👍

@codecovCodecov
Copy link

codecovbot commentedDec 25, 2024
edited
Loading

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.86%. Comparing base(d24a828) to head(464854f).
Report is 21 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@##             main   #10522      +/-   ##==========================================+ Coverage   86.78%   86.86%   +0.07%==========================================  Files         445      445                Lines       15366    15455      +89       Branches     4475     4507      +32     ==========================================+ Hits        13336    13425      +89  Misses       1675     1675                Partials      355      355
FlagCoverage Δ
unittest86.86% <ø> (+0.07%)⬆️

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

Files with missing linesCoverage Δ
packages/eslint-plugin/src/rules/array-type.ts97.26% <ø> (ø)

... and8 files with indirect coverage changes

@lunedislunedis requested a review fromronamiDecember 25, 2024 11:41
Copy link
Member

@ronamironami left a comment

Choose a reason for hiding this comment

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

Everything looks great, just a final touch! 🏆

@lunedislunedis requested a review fromronamiDecember 29, 2024 09:10
Copy link
Member

@ronamironami left a comment

Choose a reason for hiding this comment

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

Thanks! 🏆

@ronamironami added the 1 approval>=1 team member has approved this PR; we're now leaving it open for more reviews before we merge labelDec 29, 2024
Copy link
Member

@kirkwaiblingerkirkwaiblinger left a comment

Choose a reason for hiding this comment

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

Looks great! Congrats on your first PR to typescript-eslint!! 🙂

ronami and lunedis reacted with rocket emoji
@kirkwaiblingerkirkwaiblinger changed the titlefix(eslint-plugin): [array-type] autofix with conditional typesfix(eslint-plugin): [array-type] autofix with conditional types needs parenthesesDec 29, 2024
@kirkwaiblingerkirkwaiblingerenabled auto-merge (squash)December 29, 2024 20:02
@JoshuaKGoldbergJoshuaKGoldberg merged commit3097930 intotypescript-eslint:mainDec 30, 2024
65 of 68 checks passed
renovatebot added a commit to mmkal/eslint-plugin-mmkal that referenced this pull requestDec 30, 2024
##### [v8.19.0](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#8190-2024-12-30)##### 🚀 Features-   **eslint-plugin:** \[strict-boolean-expressions] check array predicate functions' return statements ([#10106](typescript-eslint/typescript-eslint#10106))##### 🩹 Fixes-   **eslint-plugin:** \[member-ordering] ignore method overloading ([#10536](typescript-eslint/typescript-eslint#10536))-   **eslint-plugin:** \[consistent-indexed-object-style] don't report on indirect circular references ([#10537](typescript-eslint/typescript-eslint#10537))-   **eslint-plugin:** \[array-type] autofix with conditional types needs parentheses ([#10522](typescript-eslint/typescript-eslint#10522))-   **eslint-plugin:** add getConstraintInfo to handle generic constraints better ([#10496](typescript-eslint/typescript-eslint#10496))##### ❤️ Thank You-   Karl Werner-   Kirk Waiblinger [@kirkwaiblinger](https://github.com/kirkwaiblinger)-   Ronen Amiel-   YeonJuan [@yeonjuan](https://github.com/yeonjuan)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.
OlivierZal pushed a commit to OlivierZal/typescript-eslint that referenced this pull requestDec 30, 2024
… parentheses (typescript-eslint#10522)* fix missing parentheses when autofixing array-filter rule with conditional types* move conditional array-type tests into standard test block* array-type tests: remove issue comments
@lunedislunedis deleted the fix/array-filter-autofix-conditional-types branchDecember 30, 2024 22:20
renovatebot added a commit to andrei-picus-tink/auto-renovate that referenced this pull requestDec 31, 2024
| datasource | package                          | from   | to     || ---------- | -------------------------------- | ------ | ------ || npm        | @typescript-eslint/eslint-plugin | 8.18.2 | 8.19.0 || npm        | @typescript-eslint/parser        | 8.18.2 | 8.19.0 |## [v8.19.0](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#8190-2024-12-30)##### 🚀 Features-   **eslint-plugin:** \[strict-boolean-expressions] check array predicate functions' return statements ([#10106](typescript-eslint/typescript-eslint#10106))##### 🩹 Fixes-   **eslint-plugin:** \[member-ordering] ignore method overloading ([#10536](typescript-eslint/typescript-eslint#10536))-   **eslint-plugin:** \[consistent-indexed-object-style] don't report on indirect circular references ([#10537](typescript-eslint/typescript-eslint#10537))-   **eslint-plugin:** \[array-type] autofix with conditional types needs parentheses ([#10522](typescript-eslint/typescript-eslint#10522))-   **eslint-plugin:** add getConstraintInfo to handle generic constraints better ([#10496](typescript-eslint/typescript-eslint#10496))##### ❤️ Thank You-   Karl Werner-   Kirk Waiblinger [@kirkwaiblinger](https://github.com/kirkwaiblinger)-   Ronen Amiel-   YeonJuan [@yeonjuan](https://github.com/yeonjuan)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.
@github-actionsgithub-actionsbot locked asresolvedand limited conversation to collaboratorsJan 7, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@ronamironamironami approved these changes

@kirkwaiblingerkirkwaiblingerkirkwaiblinger approved these changes

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.

Bug: array-type automatic fix changes type logic when used with conditional types
4 participants
@lunedis@ronami@kirkwaiblinger@JoshuaKGoldberg

[8]ページ先頭

©2009-2025 Movatter.jp