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-unsafe-call] check calls of Function#10010

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

kirkwaiblinger
Copy link
Member

PR Checklist

Overview

  • Simply check forFunction type in existing rule.
  • Minor cleanup of some sloppiness in the report messages, to ensure that they can say "Function typed" rather than "any typed"

@typescript-eslint
Copy link
Contributor

Thanks for the PR,@kirkwaiblinger!

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 commentedSep 18, 2024
edited
Loading

Deploy Preview fortypescript-eslint ready!

NameLink
🔨 Latest commitd1e954c
🔍 Latest deploy loghttps://app.netlify.com/sites/typescript-eslint/deploys/66eae80754c5600008adfe22
😎 Deploy Previewhttps://deploy-preview-10010--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 (🟢 up 4 from production)
Accessibility: 100 (no change from production)
Best Practices: 92 (no change from production)
SEO: 90 (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.

@nx-cloudNx Cloud
Copy link

nx-cloudbot commentedSep 18, 2024
edited
Loading

☁️ Nx Cloud Report

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

@kirkwaiblingerkirkwaiblinger marked this pull request as ready for reviewSeptember 18, 2024 04:23
@codecovCodecov
Copy link

codecovbot commentedSep 18, 2024
edited
Loading

Codecov Report

Attention: Patch coverage is92.85714% with1 line in your changes missing coverage. Please review.

Project coverage is 88.70%. Comparing base(385bedb) to head(d1e954c).
Report is 11 commits behind head on main.

Files with missing linesPatch %Lines
packages/eslint-plugin/src/rules/no-unsafe-call.ts92.85%1 Missing⚠️
Additional details and impacted files
@@           Coverage Diff           @@##             main   #10010   +/-   ##=======================================  Coverage   88.69%   88.70%           =======================================  Files         426      426             Lines       14829    14843   +14       Branches     4313     4318    +5     =======================================+ Hits        13153    13166   +13- Misses       1533     1534    +1  Partials      143      143
FlagCoverage Δ
unittest88.70% <92.85%> (+<0.01%)⬆️

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

Files with missing linesCoverage Δ
packages/eslint-plugin/src/rules/no-unsafe-call.ts97.05% <92.85%> (-2.95%)⬇️

@kirkwaiblingerkirkwaiblinger marked this pull request as draftSeptember 18, 2024 04:45
@kirkwaiblingerkirkwaiblinger marked this pull request as ready for reviewSeptember 18, 2024 06:14
@@ -55,7 +55,7 @@ export function parseTSConfig(code?: string): TSConfig {
const moduleRegexp = /(module\.exports\s*=)/g;

function constrainedScopeEval(obj: string): unknown {
// eslint-disable-next-line @typescript-eslint/no-implied-eval
// eslint-disable-next-line @typescript-eslint/no-implied-eval, @typescript-eslint/no-unsafe-call
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

To be clear,

// this is the no-implied-eval violationconstyoloFunction=Function('inline function');// this is the no-unsafe-call violationyoloFunction();

They just happen to be on the same line here. So, this isn't a case of these rules stepping on each others' toes IMO.

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.

Awesome. Just some comments on testing/style, nothing major.

kirkwaiblinger reacted with thumbs up emoji
}
// etc
}
```

Choose a reason for hiding this comment

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

[Praise] Great example, really clear and concise.

kirkwaiblinger reacted with heart emoji
return;
}
} else {
// eslint-disable-next-line no-lonely-if

Choose a reason for hiding this comment

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

y?

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

oh. I'll revert that.

This is just my personal vendetta; Ireally,really dislike no-lonely-if. IMO if/elseif should only be used for conditions which can be safely reorded, which is incompatible with no-lonely-if

JoshuaKGoldberg reacted with laugh emoji
@JoshuaKGoldbergJoshuaKGoldberg added the awaiting responseIssues waiting for a reply from the OP or another party labelSep 18, 2024
@kirkwaiblingerkirkwaiblinger added the enhancementNew feature or request labelSep 18, 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.

Sweet!

@github-actionsgithub-actionsbot removed the awaiting responseIssues waiting for a reply from the OP or another party labelSep 18, 2024
@JoshuaKGoldbergJoshuaKGoldberg added the 1 approval>=1 team member has approved this PR; we're now leaving it open for more reviews before we merge labelSep 18, 2024
@JoshuaKGoldbergJoshuaKGoldberg merged commite8555a0 intotypescript-eslint:mainSep 23, 2024
67 checks passed
@kirkwaiblingerkirkwaiblinger deleted the no-unsafe-call-Function branchSeptember 23, 2024 16:24
@github-actionsgithub-actionsbot locked asresolvedand limited conversation to collaboratorsOct 1, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
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 mergeenhancementNew feature or request
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

no-unsafe-call: ban calling Function
2 participants
@kirkwaiblinger@JoshuaKGoldberg

[8]ページ先頭

©2009-2025 Movatter.jp