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(eslint-plugin): [no-base-to-string] add checkUnknown Option#11128

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

Open
developer-bandi wants to merge3 commits intotypescript-eslint:main
base:main
Choose a base branch
Loading
fromdeveloper-bandi:feat/no-base-to-string

Conversation

developer-bandi
Copy link
Contributor

@developer-bandideveloper-bandi commentedMay 4, 2025
edited by kirkwaiblinger
Loading

PR Checklist

Overview

add checkUnknown option.

One thing I'm curious about is, is it correct to treat generic types as unknown?

functionfoo<T>(x:T){String(x);}

@typescript-eslint
Copy link
Contributor

Thanks for the PR,@developer-bandi!

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.

@developer-bandideveloper-bandi marked this pull request as draftMay 4, 2025 15:33
@netlifyNetlify
Copy link

netlifybot commentedMay 4, 2025
edited
Loading

Deploy Preview fortypescript-eslint ready!

NameLink
🔨 Latest commit3bdc647
🔍 Latest deploy loghttps://app.netlify.com/projects/typescript-eslint/deploys/6829e2abb016df000872d8e2
😎 Deploy Previewhttps://deploy-preview-11128--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: 99 (no change from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (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 project configuration.

@nx-cloudNx Cloud
Copy link

nx-cloudbot commentedMay 4, 2025
edited
Loading

View yourCI Pipeline Execution ↗ for commit3bdc647.

CommandStatusDurationResult
nx typecheck ast-spec✅ Succeeded<1sView ↗
nx run-many -t build --exclude website website-...✅ Succeeded2sView ↗
nx run-many -t clean --parallel=20✅ Succeeded11sView ↗

☁️Nx Cloud last updated this comment at2025-05-19 13:15:14 UTC

@developer-bandideveloper-bandi marked this pull request as ready for reviewMay 6, 2025 06:18
@JoshuaKGoldbergJoshuaKGoldberg changed the titlefeat(eslint-plugin): [no-base-to-string] add restrictUnknown Optionfeat(eslint-plugin): [no-base-to-string] add checkUnknown OptionMay 12, 2025
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, thanks!

Could you please get a passing CI so we can merge this though?

developer-bandi 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.

(wrong button)

@codecovCodecov
Copy link

codecovbot commentedMay 18, 2025
edited
Loading

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.92%. Comparing base(bca8a91) to head(3bdc647).
Report is 72 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@##             main   #11128      +/-   ##==========================================+ Coverage   90.84%   90.92%   +0.08%==========================================  Files         497      499       +2       Lines       50320    50855     +535       Branches     8311     8387      +76     ==========================================+ Hits        45714    46241     +527- Misses       4591     4599       +8  Partials       15       15
FlagCoverage Δ
unittest90.92% <100.00%> (+0.08%)⬆️

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

Files with missing linesCoverage Δ
...kages/eslint-plugin/src/rules/no-base-to-string.ts98.94% <100.00%> (+0.03%)⬆️

... and19 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@developer-bandi
Copy link
ContributorAuthor

LGTM, thanks!

Could you please get a passing CI so we can merge this though?

I added an option description to the document because there was an error that occurred not only in the CI error but also in the document due to not adding the option.

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, thanks! 🚀

Just a couple small comment on the meta property, nothing we can't touch up before merge.

type: 'boolean',
default: false,
description:
'Checks the case where toString is applied to unknown type',

Choose a reason for hiding this comment

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

[Docs] A little bit of phrasing alignment:

Suggested change
'Checks the case where toString is applied tounknown type',
'Whether to also check values of type `unknown`',

@@ -46,6 +47,12 @@ export default createRule<Options, MessageIds>({
type: 'object',
additionalProperties: false,
properties: {
checkUnknown: {
type: 'boolean',
default: false,

Choose a reason for hiding this comment

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

[Cleanup] This actually doesn't do anything in our stack (long story...)

Suggested change
default: false,

@JoshuaKGoldbergJoshuaKGoldberg added the 1 approval>=1 team member has approved this PR; we're now leaving it open for more reviews before we merge labelMay 19, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@JoshuaKGoldbergJoshuaKGoldbergJoshuaKGoldberg 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: [no-base-to-string] False negative forunknown type
2 participants
@developer-bandi@JoshuaKGoldberg

[8]ページ先頭

©2009-2025 Movatter.jp