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

feat(utils): update eslint types#4896

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
bradzacher merged 3 commits intomainfromupdate-eslint-types-2022-05-02
May 3, 2022

Conversation

bradzacher
Copy link
Member

This just updates eslint types to be in sync with the last few versions.
I just went through thehistory on the nodejs api docs file and compared the commits to what we have.

This just updates eslint types to be in sync with the last few versions.
@bradzacherbradzacher added the enhancementNew feature or request labelMay 3, 2022
@nx-cloud
Copy link

nx-cloudbot commentedMay 3, 2022
edited
Loading

☁️ Nx Cloud Report

CI is running/has finished running commands for commitc78f146. 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 43 targets

Sent with 💌 fromNxCloud.

@typescript-eslint
Copy link
Contributor

Thanks for the PR,@bradzacher!

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

@netlify
Copy link

netlifybot commentedMay 3, 2022
edited
Loading

Deploy Preview fortypescript-eslint ready!

NameLink
🔨 Latest commitc78f146
🔍 Latest deploy loghttps://app.netlify.com/sites/typescript-eslint/deploys/6271ac8bb2b3800008e3b385
😎 Deploy Previewhttps://deploy-preview-4896--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 yourNetlify site settings.

@codecov
Copy link

codecovbot commentedMay 3, 2022
edited
Loading

Codecov Report

Merging#4896 (d72c612) intomain (47f4605) willdecrease coverage by0.19%.
The diff coverage isn/a.

❗ Current headd72c612 differs from pull request most recent head10f5c0c. Consider uploading reports for the commit10f5c0c to get more accurate results

@@            Coverage Diff             @@##             main    #4896      +/-   ##==========================================- Coverage   91.76%   91.56%   -0.20%==========================================  Files         226      210      -16       Lines       10586     9239    -1347       Branches     3280     2915     -365     ==========================================- Hits         9714     8460    -1254+ Misses        591      522      -69+ Partials      281      257      -24
FlagCoverage Δ
unittest91.56% <ø> (-0.20%)⬇️

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

Impacted FilesCoverage Δ
packages/utils/src/ts-eslint/ESLint.ts50.00% <ø> (ø)
packages/utils/src/ts-eslint/RuleTester.ts100.00% <ø> (ø)
packages/utils/src/ts-eslint/SourceCode.ts100.00% <ø> (ø)
packages/typescript-estree/src/convert.ts
packages/typescript-estree/src/convert-comments.ts
...ges/typescript-estree/src/create-program/shared.ts
...-estree/src/create-program/createDefaultProgram.ts
packages/visitor-keys/src/get-keys.ts
packages/typescript-estree/src/simple-traverse.ts
packages/visitor-keys/src/visitor-keys.ts
... and13 more

* The method to asynchronously convert the LintResult objects to text.
* @since 8.4.0
*/
format(results: LintResult[]): Promise<string>;
Copy link
Member

Choose a reason for hiding this comment

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

I could be wrong, but does this actually work? Can you have overloads that differ only by return types? Mytest suggests TS never picks up this overload

Copy link
Member

@JoshuaKGoldbergJoshuaKGoldbergMay 3, 2022
edited
Loading

Choose a reason for hiding this comment

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

Yeah this should apparently be a union:string | Promise<string>. Which I find weird but 🤷 compatibility.

eslint/eslint#15242
eslint/eslint#15243
https://eslint.org/docs/developer-guide/nodejs-api#-loadedformatter-type

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

I was kind of hoping that TS would be smart here and merge the return value type.

I wanted to document the promise-based return separately as it is only accepted in a later version of ESLint.

But if TS won't let me, I'll just merge them together and describe it in the JSDoc 😢

JoshuaKGoldberg reacted with thumbs up emoji
Copy link
Member

@JoshuaKGoldbergJoshuaKGoldberg left a comment

Choose a reason for hiding this comment

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

LGTM - reviewed the ESLint blog posts for the versions and confirmed they all match up. Just need to change the overload to a union and it's good to go!

@bradzacherbradzacher merged commitda48527 intomainMay 3, 2022
@JoshuaKGoldbergJoshuaKGoldberg deleted the update-eslint-types-2022-05-02 branchMay 3, 2022 23:18
@github-actionsgithub-actionsbot locked asresolvedand limited conversation to collaboratorsJun 3, 2022
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@Josh-CenaJosh-CenaJosh-Cena left review comments

@JoshuaKGoldbergJoshuaKGoldbergJoshuaKGoldberg requested changes

Assignees
No one assigned
Labels
enhancementNew feature or request
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@bradzacher@JoshuaKGoldberg@Josh-Cena

[8]ページ先頭

©2009-2025 Movatter.jp