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): [explicit-module-boundary-types] and [explicit-function-return-type] don't report onas const satisfies#10315

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

Conversation

ronami
Copy link
Member

@ronamironami commentedNov 9, 2024
edited by kirkwaiblinger
Loading

PR Checklist

Overview

This PRresolves#10231 and adjusts bothexplicit-module-boundary-types andexplicit-function-return-type to not fail on the following whenallowDirectConstAssertionInArrowFunctions is enabled:

typeFoo={foo:string,bar:number,};exportconsta=()=>({foo:"FOOO",bar:123,}asconst);// <-- This works as expected.exportconstb=()=>({foo:"FOOO",bar:123,}asconstsatisfiesFoo);// <-- This unexpectedly causes the rules to report.

@typescript-eslint
Copy link
Contributor

Thanks for the PR,@ronami!

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 commentedNov 9, 2024
edited
Loading

Deploy Preview fortypescript-eslint ready!

NameLink
🔨 Latest commitf34addc
🔍 Latest deploy loghttps://app.netlify.com/sites/typescript-eslint/deploys/6738183a7e304e0008a14e26
😎 Deploy Previewhttps://deploy-preview-10315--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: 98 (🔴 down 1 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.

@ronamironami changed the titlefix(eslint-plugin): [explicit-module-boundary-types/explicit-function-return-type] Don't report onas const satisfiesfix(eslint-plugin): [explicit-module-boundary-types/explicit-function-return-type] don't report onas const satisfiesNov 9, 2024
@nx-cloudNx Cloud
Copy link

nx-cloudbot commentedNov 9, 2024
edited
Loading

☁️ Nx Cloud Report

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

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 2 targets

Sent with 💌 fromNxCloud.

@ronamironami changed the titlefix(eslint-plugin): [explicit-module-boundary-types/explicit-function-return-type] don't report onas const satisfiesfix(eslint-plugin): [explicit-module-boundary-types] and [explicit-function-return-type] don't report onas const satisfiesNov 9, 2024
@codecovCodecov
Copy link

codecovbot commentedNov 9, 2024
edited
Loading

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.63%. Comparing base(124b65d) to head(f34addc).
Report is 26 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@##             main   #10315      +/-   ##==========================================+ Coverage   86.56%   86.63%   +0.07%==========================================  Files         431      433       +2       Lines       15188    15208      +20       Branches     4418     4440      +22     ==========================================+ Hits        13148    13176      +28+ Misses       1683     1675       -8  Partials      357      357
FlagCoverage Δ
unittest86.63% <100.00%> (+0.07%)⬆️

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

Files with missing linesCoverage Δ
.../eslint-plugin/src/util/explicitReturnTypeUtils.ts97.77% <100.00%> (+0.10%)⬆️

... and31 files with indirect coverage changes

@ronamironami marked this pull request as ready for reviewNovember 9, 2024 21:22
Copy link
Member

@JoshuaKGoldbergJoshuaKGoldberg left a comment
edited
Loading

Choose a reason for hiding this comment

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

Great! Just requesting changes on the tests, not the teeny nitpick.

Alec Baldwin as Jack Donaghy in 30 Rock enthusiastically giving two thumbs up. Caption: "GREAT!"

ronami reacted with heart emoji
@JoshuaKGoldbergJoshuaKGoldberg added the awaiting responseIssues waiting for a reply from the OP or another party labelNov 10, 2024
@github-actionsgithub-actionsbot removed the awaiting responseIssues waiting for a reply from the OP or another party labelNov 10, 2024
JoshuaKGoldberg
JoshuaKGoldberg previously approved these changesNov 10, 2024
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.

❤️‍🔥

kirkwaiblinger and ronami reacted with heart emoji
@JoshuaKGoldbergJoshuaKGoldberg added the 1 approval>=1 team member has approved this PR; we're now leaving it open for more reviews before we merge labelNov 10, 2024
kirkwaiblinger
kirkwaiblinger previously approved these changesNov 11, 2024
@github-actionsgithub-actionsbot removed the 1 approval>=1 team member has approved this PR; we're now leaving it open for more reviews before we merge labelNov 11, 2024
kirkwaiblinger
kirkwaiblinger previously approved these changesNov 11, 2024
@kirkwaiblingerkirkwaiblinger added the 1 approval>=1 team member has approved this PR; we're now leaving it open for more reviews before we merge labelNov 11, 2024
bradzacher
bradzacher previously approved these changesNov 16, 2024
@bradzacherbradzacher dismissed stale reviews fromkirkwaiblinger and themself viaf34addcNovember 16, 2024 03:57
@bradzacherbradzacherenabled auto-merge (squash)November 16, 2024 03:58
@bradzacherbradzacher added the bugSomething isn't working labelNov 16, 2024
@bradzacherbradzacher merged commit66234d0 intotypescript-eslint:mainNov 16, 2024
61 of 64 checks passed
@ronamironami deleted the explicit-module-boundary-types-as-const-satisfies branchNovember 16, 2024 04:54
renovatebot added a commit to mmkal/eslint-plugin-mmkal that referenced this pull requestNov 18, 2024
##### [v8.15.0](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#8150-2024-11-18)##### 🚀 Features-   **eslint-plugin:** \[prefer-nullish-coalescing] fix detection of `ignoreConditionalTests` involving boolean `!` operator ([#10299](typescript-eslint/typescript-eslint#10299))-   **eslint-plugin:** new rule `no-unsafe-type-assertion` ([#10051](typescript-eslint/typescript-eslint#10051))-   **eslint-plugin:** added related-getter-setter-pairs rule ([#10192](typescript-eslint/typescript-eslint#10192))##### 🩹 Fixes-   **utils:** add defaultOptions to meta in rule ([#10339](typescript-eslint/typescript-eslint#10339))-   **eslint-plugin:** report deprecations used in default export ([#10330](typescript-eslint/typescript-eslint#10330))-   **eslint-plugin:** \[explicit-module-boundary-types] and \[explicit-function-return-type] don't report on `as const satisfies` ([#10315](typescript-eslint/typescript-eslint#10315))-   **eslint-plugin:** \[await-thenable, return-await] don't flag awaiting unconstrained type parameter as unnecessary ([#10314](typescript-eslint/typescript-eslint#10314))-   **eslint-plugin:** \[consistent-indexed-object-style] handle circular mapped types ([#10301](typescript-eslint/typescript-eslint#10301))##### ❤️  Thank You-   Josh Goldberg ✨-   Kim Sang Du [@developer-bandi](https://github.com/developer-bandi)-   Luis Sebastian Urrutia Fuentes [@LuisUrrutia](https://github.com/LuisUrrutia)-   Phillip Huang-   Ronen Amiel-   Szydlak [@wszydlak](https://github.com/wszydlak)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.
renovatebot added a commit to andrei-picus-tink/auto-renovate that referenced this pull requestNov 19, 2024
| datasource | package                          | from   | to     || ---------- | -------------------------------- | ------ | ------ || npm        | @typescript-eslint/eslint-plugin | 8.14.0 | 8.15.0 || npm        | @typescript-eslint/parser        | 8.14.0 | 8.15.0 |## [v8.15.0](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#8150-2024-11-18)##### 🚀 Features-   **eslint-plugin:** \[prefer-nullish-coalescing] fix detection of `ignoreConditionalTests` involving boolean `!` operator ([#10299](typescript-eslint/typescript-eslint#10299))-   **eslint-plugin:** new rule `no-unsafe-type-assertion` ([#10051](typescript-eslint/typescript-eslint#10051))-   **eslint-plugin:** added related-getter-setter-pairs rule ([#10192](typescript-eslint/typescript-eslint#10192))##### 🩹 Fixes-   **utils:** add defaultOptions to meta in rule ([#10339](typescript-eslint/typescript-eslint#10339))-   **eslint-plugin:** report deprecations used in default export ([#10330](typescript-eslint/typescript-eslint#10330))-   **eslint-plugin:** \[explicit-module-boundary-types] and \[explicit-function-return-type] don't report on `as const satisfies` ([#10315](typescript-eslint/typescript-eslint#10315))-   **eslint-plugin:** \[await-thenable, return-await] don't flag awaiting unconstrained type parameter as unnecessary ([#10314](typescript-eslint/typescript-eslint#10314))-   **eslint-plugin:** \[consistent-indexed-object-style] handle circular mapped types ([#10301](typescript-eslint/typescript-eslint#10301))##### ❤️  Thank You-   Josh Goldberg ✨-   Kim Sang Du [@developer-bandi](https://github.com/developer-bandi)-   Luis Sebastian Urrutia Fuentes [@LuisUrrutia](https://github.com/LuisUrrutia)-   Phillip Huang-   Ronen Amiel-   Szydlak [@wszydlak](https://github.com/wszydlak)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 collaboratorsNov 26, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@bradzacherbradzacherbradzacher approved these changes

@JoshuaKGoldbergJoshuaKGoldbergJoshuaKGoldberg left review comments

@kirkwaiblingerkirkwaiblingerkirkwaiblinger left review comments

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 mergebugSomething isn't working
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Bug: [explicit-module-boundary-types]allowDirectConstAssertionInArrowFunctions should not error when also usingsatisfies
4 participants
@ronami@JoshuaKGoldberg@bradzacher@kirkwaiblinger

[8]ページ先頭

©2009-2025 Movatter.jp