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): [restrict-plus-operands] add allow* options#6161

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 commentedDec 3, 2022
edited
Loading

PR Checklist

Overview

Brings in theallowBoolean,allowNullish, andallowRegExp options from@typescript-eslint/restrict-template-expressions. Also adds anallowNumberWithString option equivalent to theallowNumber option, as a more-specific-to-this-rule name.

Internally streamlines the rule a bit by having comparisons directly refer tots.TypeFlags checks whenever possible.

@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 commentedDec 3, 2022
edited
Loading

☁️ Nx Cloud Report

CI is running/has finished running commands for commit548b7df. 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 commentedDec 3, 2022
edited
Loading

Deploy Preview fortypescript-eslint ready!

NameLink
🔨 Latest commit548b7df
🔍 Latest deploy loghttps://app.netlify.com/sites/typescript-eslint/deploys/638b0ee56015fb00081386a5
😎 Deploy Previewhttps://deploy-preview-6161--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.


if(types.some(value=>value==='bigint')){
return'bigint';
}
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

These three innerif (types.some(... cases weren't covered by code coverage. Most of the intersections in the previous test suite reduced tonever. I got rid of most of them.

@codecov
Copy link

codecovbot commentedDec 3, 2022
edited
Loading

Codecov Report

Merging#6161 (548b7df) intomain (e458b5a) willincrease coverage by0.04%.
The diff coverage is100.00%.

Additional details and impacted files
@@            Coverage Diff             @@##             main    #6161      +/-   ##==========================================+ Coverage   91.26%   91.31%   +0.04%==========================================  Files         366      366                Lines       12427    12426       -1       Branches     3639     3644       +5     ==========================================+ Hits        11342    11347       +5+ Misses        774      768       -6  Partials      311      311
FlagCoverage Δ
unittest91.31% <100.00%> (+0.04%)⬆️

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

Impacted FilesCoverage Δ
...-plugin/src/rules/restrict-template-expressions.ts100.00% <ø> (ø)
.../eslint-plugin/src/rules/restrict-plus-operands.ts100.00% <100.00%> (+11.32%)⬆️

@JoshuaKGoldbergJoshuaKGoldberg marked this pull request as ready for reviewDecember 3, 2022 09:19
@bradzacherbradzacher added the enhancement: plugin rule optionNew rule option for an existing eslint-plugin rule labelJan 30, 2023
bradzacher
bradzacher previously requested changesMar 7, 2023
@JoshuaKGoldberg
Copy link
MemberAuthor

Drafting this pending discussion in#6110

@bradzacherbradzacher marked this pull request as draftMarch 13, 2023 02:18
@github-actionsgithub-actionsbot locked asresolvedand limited conversation to collaboratorsMar 21, 2023
@JoshuaKGoldbergJoshuaKGoldberg marked this pull request as ready for reviewApril 5, 2023 20:24
@JoshuaKGoldbergJoshuaKGoldberg requested review frombradzacher and removed request forbradzacherJune 10, 2023 00:50
@JoshuaKGoldbergJoshuaKGoldberg added this to the6.0.0 milestoneJun 13, 2023
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.

image

Yeah looks good - nice and loud and explicit to help people understand better practices

@JoshuaKGoldbergJoshuaKGoldberg merged commitdef09f8 intotypescript-eslint:mainJun 15, 2023
@JoshuaKGoldbergJoshuaKGoldberg deleted the restrict-plus-operands-allow-options branchJune 15, 2023 16:17
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.

Reviewers

@bradzacherbradzacherbradzacher approved these changes

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

Assignees

No one assigned

Labels

enhancement: plugin rule optionNew rule option for an existing eslint-plugin rule

Projects

None yet

Milestone

6.0.0

Development

Successfully merging this pull request may close these issues.

Enhancement: [restrict-plus-operands] Bring in options from restrict-template-expressions

2 participants

@JoshuaKGoldberg@bradzacher

[8]ページ先頭

©2009-2025 Movatter.jp