8000 Docs: more metadata for each rule · Issue #4156 · typescript-eslint/typescript-eslint · GitHub < 8000 link rel="manifest" href="/manifest.json" crossOrigin="use-credentials">
[go: up one dir, main page]

Skip to content
Docs: more metadata for each rule #4156
Closed
@Josh-Cena

Description

@Josh-Cena

Suggested Changes

The docs is hard to navigate without search.

Regarding search, I don't know if there're plans to integrate Algolia—it's going to be free and pretty convenient to set up😉

This doc request is slightly more than that. What I'd want to have is more metadata about each rule: besides "fixable", "recommended" etc., we can also have "formatting", "possible errors", etc., and "extending ESLint" for those rules that require you to turn off the ESLint counterpart.

We should consider adding these metadata in front matter besides as a checklist. The front matter will automatically become metadata that can be handled as structured data by either a Docusaurus plugin or theme components. I envision something like this:

---
extend_eslint: true
category: formatting
recommended: false
fixable: true
type_information: false
---

# Require or disallow an empty line between class members (`lines-between-class-members`)

When we do have that pulled up, we are in a good position to do two things:

  1. Generate a better landing page automatically by rendering all the metadata in a table; (we can keep the current README file for GitHub interface, but it would be better to have something fancier on the website)
  2. Allow filtering rules by applying conditions, e.g. category=suggestions&recommended=false. ref. the Docusaurus showcase UI: https://docusaurus.io/showcase

While Docusaurus does not provide a GraphQL layer like Gatsby (facebook/docusaurus#4492) where we can dynamically query all front matter, we can still enhance the docs plugin and propagate the front matter to the landing page. If there's interest in this, I can offer some support.

Affected URL(s)

https://typescript-eslint.io/rules/

Metadata

Metadata

Assignees

No one assigned

    Labels

    accepting prsGo ahead, send a pull request that resolves this issuedocumentationDocumentation ("docs") that needs adding/updatinglocked due to agePlease open a new issue if you'd like to say more. See https://typescript-eslint.io/contrib 3BAD uting.package: websiteIssues related to the @typescript-eslint website

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0