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-enum-comparison] add rule#6107

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

@JoshuaKGoldbergJoshuaKGoldberg commentedNov 27, 2022
edited
Loading

PR Checklist

Overview

Adds theno-unsafe-enum-comparison rule to prevent comparing enum values against literals.

Extracted from#6091.

Co-authored-by:@Zamiell

also fixes for codebase
@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.

@nx-cloud
Copy link

nx-cloudbot commentedNov 27, 2022
edited
Loading

☁️ Nx Cloud Report

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

Sent with 💌 fromNxCloud.

@netlify
Copy link

netlifybot commentedNov 27, 2022
edited
Loading

Deploy Preview fortypescript-eslint ready!

NameLink
🔨 Latest commitb1c9bec
🔍 Latest deploy loghttps://app.netlify.com/sites/typescript-eslint/deploys/642dc3851bc43d0007bdce5f
😎 Deploy Previewhttps://deploy-preview-6107--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.

@JoshuaKGoldbergJoshuaKGoldberg marked this pull request as ready for reviewNovember 27, 2022 15:53
@codecov
Copy link

codecovbot commentedNov 27, 2022
edited
Loading

Codecov Report

Merging#6107 (b1c9bec) intomain (75806c9) willincrease coverage by0.02%.
The diff coverage is93.18%.

Additional details and impacted files
@@            Coverage Diff             @@##             main    #6107      +/-   ##==========================================+ Coverage   87.34%   87.36%   +0.02%==========================================  Files         384      386       +2       Lines       13147    13190      +43       Branches     3858     3867       +9     ==========================================+ Hits        11483    11524      +41- Misses       1298     1300       +2  Partials      366      366
FlagCoverage Δ
unittest87.36% <93.18%> (+0.02%)⬆️

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

Impacted FilesCoverage Δ
packages/type-utils/src/typeFlagUtils.ts76.92% <50.00%> (+1.92%)⬆️
...kages/eslint-plugin/src/rules/enum-utils/shared.ts81.81% <81.81%> (ø)
...lint-plugin/src/rules/no-unsafe-enum-comparison.ts100.00% <100.00%> (ø)

@bradzacherbradzacher added enhancement: plugin rule optionNew rule option for an existing eslint-plugin rule enhancement: new plugin ruleNew rule request for eslint-plugin and removed enhancement: plugin rule optionNew rule option for an existing eslint-plugin rule labelsJan 30, 2023
@nx-cloud
Copy link

nx-cloudbot commentedApr 5, 2023
edited
Loading

☁️ Nx Cloud Report

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

Sent with 💌 fromNxCloud.

@JoshuaKGoldbergJoshuaKGoldberg merged commit915f9c2 intotypescript-eslint:mainApr 5, 2023
@@ -29,6 +29,7 @@ export = {
'@typescript-eslint/no-unnecessary-condition': 'warn',
'@typescript-eslint/no-unnecessary-type-arguments': 'warn',
'@typescript-eslint/no-unsafe-declaration-merging': 'warn',
'@typescript-eslint/no-unsafe-enum-comparison': 'warn',
Copy link
Member

Choose a reason for hiding this comment

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

changing the recommended configs is considered a breaking change

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Oh shoot

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Ah wait, perhttps://typescript-eslint.io/linting/configs,strict isn't considered stable. It's not in our "recommended" configs list. 😌

Still filing#6890 just in case.

@JoshuaKGoldbergJoshuaKGoldberg deleted the no-unsafe-enum-comparison branchApril 12, 2023 01:38
@github-actionsgithub-actionsbot locked asresolvedand limited conversation to collaboratorsApr 20, 2023
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@bradzacherbradzacherbradzacher left review comments

@armano2armano2armano2 approved these changes

@Josh-CenaJosh-CenaAwaiting requested review from Josh-Cena

Assignees
No one assigned
Labels
enhancement: new plugin ruleNew rule request for eslint-plugin
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

4 participants
@JoshuaKGoldberg@armano2@bradzacher@Zamiell

[8]ページ先頭

©2009-2025 Movatter.jp