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

chore: enable no-confusing-void-expression internally#8375

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

JoshuaKGoldberg
Copy link
Member

PR Checklist

Overview

Enables the rule internally and runs its--fix to correct all violations. The fixed style isn't always quite what I'd want, but I figured anything we definitively don't like should probably be enforced with separate lint rules:

  • Usingfor..of instead of.forEach
  • Not having{}s around aswitchcase unnecessarily

@typescript-eslint
Copy link
Contributor

Thanks for the PR,@JoshuaKGoldberg!

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 commentedFeb 4, 2024
edited
Loading

Deploy Preview fortypescript-eslint ready!

NameLink
🔨 Latest commitf8b2f4e
🔍 Latest deploy loghttps://app.netlify.com/sites/typescript-eslint/deploys/65d60d6898874d00085e7815
😎 Deploy Previewhttps://deploy-preview-8375--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 (🟢 up 8 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.

@nx-cloudNx Cloud
Copy link

nx-cloudbot commentedFeb 4, 2024
edited
Loading

☁️ Nx Cloud Report

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

Sent with 💌 fromNxCloud.

@codecovCodecov
Copy link

codecovbot commentedFeb 4, 2024
edited
Loading

Codecov Report

Attention: Patch coverage is95.23810% with9 lines in your changes are missing coverage. Please review.

Project coverage is 87.79%. Comparing base(f36f682) to head(f8b2f4e).
Report is 19 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@##             main    #8375      +/-   ##==========================================+ Coverage   86.94%   87.79%   +0.84%==========================================  Files         252      398     +146       Lines       12251    13902    +1651       Branches     3861     4067     +206     ==========================================+ Hits        10652    12205    +1553- Misses       1332     1400      +68- Partials      267      297      +30
FlagCoverage Δ
unittest87.79% <95.23%> (+0.84%)⬆️

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

FilesCoverage Δ
...gin-internal/src/rules/no-poorly-typed-ts-props.ts95.65% <100.00%> (+0.19%)⬆️
...lugin-internal/src/rules/plugin-test-formatting.ts79.88% <100.00%> (+0.69%)⬆️
...plugin-internal/src/rules/prefer-ast-types-enum.ts100.00% <ø> (ø)
packages/eslint-plugin/src/rules/ban-types.ts100.00% <100.00%> (ø)
...-plugin/src/rules/explicit-function-return-type.ts97.87% <100.00%> (ø)
...plugin/src/rules/explicit-module-boundary-types.ts92.90% <100.00%> (+0.48%)⬆️
...kages/eslint-plugin/src/rules/func-call-spacing.ts96.77% <100.00%> (+0.10%)⬆️
packages/eslint-plugin/src/rules/indent.ts87.80% <100.00%> (ø)
...es/eslint-plugin/src/rules/lines-around-comment.ts100.00% <100.00%> (ø)
...ackages/eslint-plugin/src/rules/member-ordering.ts97.98% <100.00%> (ø)
... and16 more

... and142 files with indirect coverage changes

@JoshuaKGoldbergJoshuaKGoldberg added the blocked by another PRPRs which are ready to go but waiting on another PR labelFeb 5, 2024
@JoshuaKGoldberg
Copy link
MemberAuthor

JoshuaKGoldberg commentedFeb 5, 2024
edited
Loading

I'll wait to merge these changes until the flat config work lands.

Edit: ✔️

@JoshuaKGoldbergJoshuaKGoldberg removed the blocked by another PRPRs which are ready to go but waiting on another PR labelFeb 21, 2024
Copy link
Member

@bradzacherbradzacher left a comment

Choose a reason for hiding this comment

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

Looking at the changes - TBH I don't really like this rule.
I don't think any of these changes improve clarity or readability of code.

The biggest issue I see is that if the function is implicitly typed or explicitly marked as returningvoid the rule still requires you to change things.

For example this code should pass the rule, IMO:

functionreturnsVoid():void{}functiontest1():void{returnreturnsVoid();// should be fine}consttest2=():void=>returnsVoid();// should be fine

Because there's nothing confusing about that code - the expressions are all typed asvoid and the functions are typed asvoid.

Also changes like() => expr =>() => { expr } actively reduce readability, IMO, esp when considering the above.

So I'm personally a bit 👎 on this.

@JoshuaKGoldberg
Copy link
MemberAuthor

👍 Blocked on#8538.

@JoshuaKGoldbergJoshuaKGoldberg added the blocked by another issueIssues which are not ready because another issue needs to be resolved first labelFeb 23, 2024
@JoshuaKGoldbergJoshuaKGoldberg marked this pull request as draftFebruary 23, 2024 12:49
@github-actionsgithub-actionsbot locked asresolvedand limited conversation to collaboratorsMar 14, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@bradzacherbradzacherbradzacher left review comments

Assignees
No one assigned
Labels
blocked by another issueIssues which are not ready because another issue needs to be resolved first
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@JoshuaKGoldberg@bradzacher

[8]ページ先頭

©2009-2025 Movatter.jp