Skip to content

chore(website): move rule attributes to top of docs pages #5702

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 Oct 1, 2022

PR Checklist

Overview

Shamelessly copies the idea from the new eslint.org designs [eslint.org redesign blog post]. We don't have nearly as fancy or thought out a website design system, but the idea of putting emoji-labeled mini-admonitions for rule attributes is a good one. Cheers + thanks @haydenbleasel! 😄

Also moves the .eslintrc.cjs to be earlier in the page - now just before the first h2, and therefore after any opening paragraphs of info. This makes the pages feel to me like they start more consistently & lead with the rule attributes, basic information, and how to enable individually.

Before After
Screenshot of the array-type rule with a list for rule attributes Screenshot of the array-type rule with a row of two half-width admonitions for rule attributes

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

@nx-cloud
Copy link

nx-cloud bot commented Oct 1, 2022

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 02e55a0. 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 💌 from NxCloud.

@netlify
Copy link

netlify bot commented Oct 1, 2022

Deploy Preview for typescript-eslint ready!

Name Link
🔨 Latest commit 02e55a0
🔍 Latest deploy log https://app.netlify.com/sites/typescript-eslint/deploys/633c1e6e9da4440008fe55ac
😎 Deploy Preview https://deploy-preview-5702--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.

@JoshuaKGoldberg JoshuaKGoldberg marked this pull request as ready for review October 1, 2022 06:21
bradzacher
bradzacher previously approved these changes Oct 4, 2022
@bradzacher bradzacher added the 1 approval >=1 team member has approved this PR; we're now leaving it open for more reviews before we merge label Oct 4, 2022
@codecov
Copy link

codecov bot commented Oct 4, 2022

Codecov Report

Merging #5702 (1c119d3) into main (2eb7035) will increase coverage by 2.80%.
The diff coverage is n/a.

❗ Current head 1c119d3 differs from pull request most recent head 02e55a0. Consider uploading reports for the commit 02e55a0 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5702      +/-   ##
==========================================
+ Coverage   91.01%   93.82%   +2.80%     
==========================================
  Files         365      134     -231     
  Lines       11969     1506   -10463     
  Branches     3487      226    -3261     
==========================================
- Hits        10894     1413    -9481     
+ Misses        781       60     -721     
+ Partials      294       33     -261     
Flag Coverage Δ
unittest 93.82% <ø> (+2.80%) ⬆️

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

Impacted Files Coverage Δ
packages/utils/src/ts-eslint-scope/Scope.ts
.../utils/src/ast-utils/eslint-utils/scopeAnalysis.ts
...lugin/src/rules/no-confusing-non-null-assertion.ts
packages/utils/src/eslint-utils/deepMerge.ts
...ges/type-utils/src/getConstrainedTypeAtLocation.ts
...ckages/eslint-plugin/src/rules/no-unsafe-return.ts
...ils/src/ast-utils/eslint-utils/ReferenceTracker.ts
packages/utils/src/ast-utils/eslint-utils/index.ts
...utils/src/ast-utils/eslint-utils/PatternMatcher.ts
packages/visitor-keys/src/get-keys.ts
... and 221 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.

sehr gut ja!

image

@bradzacher bradzacher enabled auto-merge (squash) October 4, 2022 12:06
@bradzacher bradzacher merged commit cfa902f into typescript-eslint:main Oct 4, 2022
@JoshuaKGoldberg JoshuaKGoldberg deleted the rule-attributes-top branch October 4, 2022 12:56
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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
Development

Successfully merging this pull request may close these issues.

Website: Move rule Attributes section to top of rules pages, like eslint.org
2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy