Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(eslint-plugin): [space-infix-ops] correct PropertyDefinition with typeAnnotation #5113

Merged
merged 1 commit into from May 30, 2022

Conversation

armano2
Copy link
Member

@armano2 armano2 commented May 30, 2022

PR Checklist

Overview

correct seelcting last node of PropertyDefinition when typeAnnotation is present

regression fix for #5041 /^[=|?|:]$/.test(token.value)

@nx-cloud
Copy link

nx-cloud bot commented May 30, 2022

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 6077dd0. 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 47 targets

Sent with 💌 from NxCloud.

@typescript-eslint
Copy link
Contributor

Thanks for the PR, @armano2!

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. As a thank you, your profile/company logo will be added to our main README which receives thousands of unique visitors per day.

@netlify
Copy link

netlify bot commented May 30, 2022

Deploy Preview for typescript-eslint ready!

Name Link
🔨 Latest commit 6077dd0
🔍 Latest deploy log https://app.netlify.com/sites/typescript-eslint/deploys/629525581487ee0008063e3d
😎 Deploy Preview https://deploy-preview-5113--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.

@armano2 armano2 added package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin bug Something isn't working labels May 30, 2022
@codecov
Copy link

codecov bot commented May 30, 2022

Codecov Report

Merging #5113 (6077dd0) into main (90f3960) will increase coverage by 2.12%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #5113      +/-   ##
==========================================
+ Coverage   91.70%   93.83%   +2.12%     
==========================================
  Files         362      286      -76     
  Lines       12181     9838    -2343     
  Branches     3530     2939     -591     
==========================================
- Hits        11171     9231    -1940     
+ Misses        661      328     -333     
+ Partials      349      279      -70     
Flag Coverage Δ
unittest 93.83% <100.00%> (+2.12%) ⬆️

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

Impacted Files Coverage Δ
...ackages/eslint-plugin/src/rules/space-infix-ops.ts 100.00% <100.00%> (ø)
packages/utils/src/ast-utils/helpers.ts
packages/utils/src/ts-eslint/ESLint.ts
...ckages/typescript-estree/src/jsx/xhtml-entities.ts
packages/utils/src/ast-utils/eslint-utils/index.ts
...plugin-internal/src/rules/prefer-ast-types-enum.ts
packages/utils/src/ts-eslint-scope/Scope.ts
...ckages/utils/src/eslint-utils/getParserServices.ts
packages/eslint-plugin-tslint/src/custom-linter.ts
packages/utils/src/eslint-utils/applyDefault.ts
... and 67 more

Copy link
Member

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Choose a reason for hiding this comment

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

TIL, thanks!

@JoshuaKGoldberg JoshuaKGoldberg merged commit d320174 into main May 30, 2022
@JoshuaKGoldberg JoshuaKGoldberg deleted the fix/space-infix-ops-5109 branch May 30, 2022 20:30
@CyanSalt
Copy link

CyanSalt commented Jun 1, 2022

As mentioned here at #5133 (comment), most of the false positives have been eliminated after I used the version that includes the fix, but the code that contains the extends still triggers similar problems.

type Foo<T> = T extends { bar: string } ? string : number
                             ^
type Foo<T> = T extends (bar: string) => void ? string : number
                            ^

@armano2
Copy link
Member Author

armano2 commented Jun 1, 2022

As mentioned here at #5133 (comment), most of the false positives have been eliminated after I used the version that includes the fix, but the code that contains the extends still triggers similar problems.

i filled new issue for this bug #5134

@pkudryashov
Copy link

in version 5.27.1-alpha.13 error

type Foo<T extends (...args: any[]) => any> = T;
                           ^

@bradzacher
Copy link
Member

As per our contributing guidelines - PRs are not the place to discuss issues. Locking.

@typescript-eslint typescript-eslint locked and limited conversation to collaborators Jun 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: [space-infix-ops] Spurious warning after upgrade to 5.27.0
5 participants