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): [member-ordering] add a required option for required vs. optional member ordering#5965

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

Merged
JoshuaKGoldberg merged 15 commits intotypescript-eslint:mainfromasdf93074:feat/5596
Nov 28, 2022

Conversation

@asdf93074
Copy link
Contributor

@asdf93074asdf93074 commentedNov 10, 2022
edited by JoshuaKGoldberg
Loading

PR Checklist

Overview

Added a new property required to SortedOrderConfig.
Added a corresponding error message id for when a rule fails because of required being set to 'first' or 'last'.

If required is 'first', then before any sorting/grouping configurations, we ensure that the members array has all its required items first and all optional items afterwards. Afterwards, we perform the remaining sorting/grouping checks on the required subset and the optional subset.

@nx-cloud
Copy link

nx-cloudbot commentedNov 10, 2022
edited
Loading

☁️ Nx Cloud Report

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

@typescript-eslint
Copy link
Contributor

Thanks for the PR,@asdf93074!

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.

@netlify
Copy link

netlifybot commentedNov 10, 2022
edited
Loading

Deploy Preview fortypescript-eslint ready!

NameLink
🔨 Latest commit17c0595
🔍 Latest deploy loghttps://app.netlify.com/sites/typescript-eslint/deploys/6384d886051118000832fa09
😎 Deploy Previewhttps://deploy-preview-5965--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.

@codecov
Copy link

codecovbot commentedNov 10, 2022
edited
Loading

Codecov Report

Merging#5965 (17c0595) intomain (becd1f8) willincrease coverage by0.02%.
The diff coverage is100.00%.

Additional details and impacted files
@@            Coverage Diff             @@##             main    #5965      +/-   ##==========================================+ Coverage   91.24%   91.27%   +0.02%==========================================  Files         366      366                Lines       12380    12417      +37       Branches     3621     3631      +10     ==========================================+ Hits        11296    11333      +37  Misses        774      774                Partials      310      310
FlagCoverage Δ
unittest91.27% <100.00%> (+0.02%)⬆️

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

Impacted FilesCoverage Δ
...ackages/eslint-plugin/src/rules/member-ordering.ts96.13% <100.00%> (+0.73%)⬆️
packages/eslint-plugin/src/util/misc.ts96.87% <100.00%> (+0.44%)⬆️

…d which takes first or last as a value and adding functionality to check order based on both of these along with additional tests.
@asdf93074asdf93074 marked this pull request as ready for reviewNovember 15, 2022 11:23
@JoshuaKGoldbergJoshuaKGoldberg changed the titlefeat(eslint-plugin): [member-ordering] Add a requiredFirst option to ensure that all required members are declared before all optional ones.feat(eslint-plugin): [member-ordering] Add a required option to ensure that all required members are declared before all optional ones.Nov 15, 2022
@JoshuaKGoldbergJoshuaKGoldberg changed the titlefeat(eslint-plugin): [member-ordering] Add a required option to ensure that all required members are declared before all optional ones.feat(eslint-plugin): [member-ordering] add a required option for required vs. optional member orderingNov 15, 2022
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.

Thanks for sending this in@asdf93074! I'm excited to get this feature in. 🎉

There's a lot of changed code in this PR and themember-ordering rule is already a lot of lines. We should be able to trim the changes down a bit to be easier to read & review. I can take a deeper look once the refactors are done. Let me know if anything's unclear or not right!

@JoshuaKGoldbergJoshuaKGoldberg added the awaiting responseIssues waiting for a reply from the OP or another party labelNov 15, 2022
@bradzacherbradzacher removed the awaiting responseIssues waiting for a reply from the OP or another party labelNov 18, 2022
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.

Thanks for making the changes@asdf93074! I actually personally find this a good deal easier to read, but maybe that's just my personal preference. If another maintainer wants to weigh in that'd be good too 😄 - I'm nervous about stomping over perfectly good code. (and to be fair, yours did work quite well before too!)

Just requesting changes on a bit more testing. Otherwise this looks good to me!

@JoshuaKGoldbergJoshuaKGoldberg added the awaiting responseIssues waiting for a reply from the OP or another party labelNov 19, 2022
JoshuaKGoldberg
JoshuaKGoldberg previously approved these changesNov 22, 2022
Copy link
Member

@JoshuaKGoldbergJoshuaKGoldberg left a comment
edited
Loading

Choose a reason for hiding this comment

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

Fantastic, this is looking great. Thanks for sending this in and iterating on it with me@asdf93074! 🙌

asdf93074 reacted with rocket emoji
@JoshuaKGoldberg
Copy link
Member

JoshuaKGoldberg commentedNov 22, 2022
edited
Loading

I'll leave this open for a bit in case another maintainer wants to poke at it or suggest an alternative API name (which we can apply ourselves if you don't want to keep receiving extra work because of our indecision 😅). But I've set a reminder to merge it this weekend if nobody requests changes, so it'll be available in our next stable version.

Edit: see#5965 (comment), will go on Monday!

asdf93074 reacted with thumbs up emoji

@JoshuaKGoldbergJoshuaKGoldberg added 1 approval>=1 team member has approved this PR; we're now leaving it open for more reviews before we merge and removed awaiting responseIssues waiting for a reply from the OP or another party labelsNov 22, 2022
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.

🙌

asdf93074 reacted with thumbs up emoji
@JoshuaKGoldbergJoshuaKGoldberg merged commit2abadc6 intotypescript-eslint:mainNov 28, 2022
@github-actionsgithub-actionsbot locked asresolvedand limited conversation to collaboratorsDec 6, 2022
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.

Reviewers

@bradzacherbradzacherbradzacher left review comments

@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.

Enhancement: [member-ordering] Port requiredFirst from eslint-plugin-typescript-sort-keys

3 participants

@asdf93074@JoshuaKGoldberg@bradzacher

[8]ページ先頭

©2009-2025 Movatter.jp