Skip to content

docs: overhauled member-ordering docs and types #4873

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

JoshuaKGoldberg
Copy link
Member

@JoshuaKGoldberg JoshuaKGoldberg commented Apr 26, 2022

PR Checklist

Overview

A few touchups:

  • Simplifies and streamlines the explanations of memberTypes and order in the rule docs.
  • Converts the old style of headings for incorrect vs. correct code snippets to the nice new <!-- tabs --> format
  • Uses string template literals in the rule itself to make MemberType more clear

Throwing up a draft because I did this in my stream and didn't have time to finish. 😄 Will finish soon I hope!https://www.twitch.tv/videos/1467641307

@nx-cloud
Copy link

nx-cloud bot commented Apr 26, 2022

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 9ec12eb. 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 43 targets

Sent with 💌 from NxCloud.

@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 on https://opencollective.com/typescript-eslint. As a thank you, your profile/company logo will be added to our main README which receives thousands of unique visitors per day.

@netlify
Copy link

netlify bot commented Apr 26, 2022

Deploy Preview for typescript-eslint ready!

Name Link
🔨 Latest commit 9ec12eb
🔍 Latest deploy log https://app.netlify.com/sites/typescript-eslint/deploys/626bebbd86560a00084086d7
😎 Deploy Preview https://deploy-preview-4873--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 your Netlify site settings.

@codecov
Copy link

codecov bot commented Apr 26, 2022

Codecov Report

Merging #4873 (9ec12eb) into main (f3cf87b) will increase coverage by 2.48%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #4873      +/-   ##
==========================================
+ Coverage   91.77%   94.25%   +2.48%     
==========================================
  Files         227      153      -74     
  Lines       10611     8301    -2310     
  Branches     3283     2701     -582     
==========================================
- Hits         9738     7824    -1914     
+ Misses        591      263     -328     
+ Partials      282      214      -68     
Flag Coverage Δ
unittest 94.25% <100.00%> (+2.48%) ⬆️

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

Impacted Files Coverage Δ
packages/eslint-plugin/src/configs/all.ts 100.00% <ø> (ø)
packages/eslint-plugin/src/rules/comma-spacing.ts 100.00% <100.00%> (ø)
...ackages/eslint-plugin/src/rules/member-ordering.ts 95.55% <100.00%> (-0.13%) ⬇️
...slint-plugin/src/rules/no-duplicate-enum-values.ts 100.00% <100.00%> (ø)
packages/utils/src/ts-eslint-scope/analyze.ts
packages/utils/src/ts-eslint-scope/Referencer.ts
packages/utils/src/eslint-utils/applyDefault.ts
packages/type-utils/src/getTypeArguments.ts
packages/utils/src/ts-eslint/ESLint.ts
...ckages/typescript-estree/src/jsx/xhtml-entities.ts
... and 69 more

@bradzacher bradzacher added the documentation Documentation ("docs") that needs adding/updating label Apr 27, 2022
@JoshuaKGoldberg JoshuaKGoldberg marked this pull request as ready for review April 29, 2022 13:09

### Member types (granular form)
<details>
<summary>Expand this to see the full list of all supported member type groups.</summary>
Copy link
Member Author

Choose a reason for hiding this comment

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

This exposes a bug(?) in Docusaurus. The right-side headings menu still displays headings within a <details> (which should be allowed) even if collapsed. Clicking those heading links does nothing while collapsed.

member-ordering._.TypeScript.ESLint.-.Google.Chrome.2022-04-29.09-11-02.mp4

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

If the bug isn't accepted -or if you the reviewer hate this pattern- I can remove the <details> and move its content to a new section after ## Examples. Otherwise I'd consider that bug blocking merging this PR.

The rest of the PR should still be ready for review though! ✨

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member

@bradzacher bradzacher left a comment

Choose a reason for hiding this comment

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

@bradzacher bradzacher merged commit 98e6234 into typescript-eslint:main May 2, 2022
@JoshuaKGoldberg JoshuaKGoldberg deleted the docs-member-ordering branch May 2, 2022 10:23
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Documentation ("docs") that needs adding/updating
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants