Skip to content

fix(eslint-plugin): [no-unnecessary-condition] handle index signature type - #5912

Merged
JoshuaKGoldberg merged 1 commit into
typescript-eslint:mainfrom
yeonjuan:fix/#4954
Nov 15, 2022
Merged

JoshuaKGoldberg merged 1 commit into
typescript-eslint:mainfrom
yeonjuan:fix/#4954

Conversation

@yeonjuan

@yeonjuan yeonjuan commented Nov 1, 2022

Copy link
Copy Markdown
Contributor

PR Checklist

Overview

Adds handling for type index signatures to nullable origin checking.

@nx-cloud

nx-cloud Bot commented Nov 1, 2022

Copy link
Copy Markdown

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 4a0c9eb. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


✅ Successfully ran 46 targets

Sent with 💌 from NxCloud.

@typescript-eslint

Copy link
Copy Markdown
Contributor

Thanks for the PR, @yeonjuan!

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

netlify Bot commented Nov 1, 2022

Copy link
Copy Markdown

Deploy Preview for typescript-eslint ready!

Name Link
🔨 Latest commit 4a0c9eb
🔍 Latest deploy log https://app.netlify.com/sites/typescript-eslint/deploys/636150491630820008ff2938
😎 Deploy Preview https://deploy-preview-5912--typescript-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@codecov

codecov Bot commented Nov 1, 2022

Copy link
Copy Markdown

Codecov Report

Merging #5912 (4a0c9eb) into main (1f14c03) will decrease coverage by 0.03%.
The diff coverage is 100.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5912      +/-   ##
==========================================
- Coverage   91.35%   91.32%   -0.04%     
==========================================
  Files         365      365              
  Lines       12199    12214      +15     
  Branches     3560     3564       +4     
==========================================
+ Hits        11144    11154      +10     
- Misses        749      752       +3     
- Partials      306      308       +2     
Flag Coverage Δ
unittest 91.32% <100.00%> (-0.04%) ⬇️

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

Impacted Files Coverage Δ
...slint-plugin/src/rules/no-unnecessary-condition.ts 98.33% <100.00%> (+0.01%) ⬆️
...s/utils/src/eslint-utils/rule-tester/RuleTester.ts 85.54% <0.00%> (-4.46%) ⬇️
packages/utils/src/ts-eslint/RuleTester.ts 100.00% <0.00%> (ø)
.../eslint-plugin/src/rules/sort-type-constituents.ts 90.74% <0.00%> (ø)
.../src/rules/sort-type-union-intersection-members.ts 90.74% <0.00%> (ø)

@yeonjuan
yeonjuan marked this pull request as ready for review November 2, 2022 03:42
@JoshuaKGoldberg JoshuaKGoldberg changed the title fix(eslint-plugin): [no-unnecessary-condition] handle mapped type fix(eslint-plugin): [no-unnecessary-condition] handle index signature type Nov 15, 2022

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, thanks @yeonjuan! 🚀

@JoshuaKGoldberg
JoshuaKGoldberg enabled auto-merge (squash) November 15, 2022 16:49
@JoshuaKGoldberg
JoshuaKGoldberg merged commit 5baad08 into typescript-eslint:main Nov 15, 2022
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Nov 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[no-unnecessary-condition] Shows optional chaining on index signature type as unnecessary

2 participants