Skip to content
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

Docs: Mention Stylistic as the source of replacement rules for all the stylistic rules that got deprecated #18053

Open
1 task
danfuzz opened this issue Jan 30, 2024 · 8 comments
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion documentation Relates to ESLint's documentation

Comments

@danfuzz
Copy link

danfuzz commented Jan 30, 2024

Docs page(s)

https://eslint.org/docs/latest/rules/#deprecated

What documentation issue do you want to solve?

In the "deprecated rules" section, the ESLint docs sometimes indicate what a deprecated rule is replaced by. However, in the case of the rules that moved to Stylistic, there's no indication that that's where to find them.

I noticed this because, while perusing the docs, I was surprised that semi was deprecated with no apparent-in-the-docs replacement. Since deprecated rules aren't linked to their documentation page, it took a bit of spelunking to figure out what happened. To be clear, the documentation page at https://eslint.org/docs/latest/rules/semi does indicate where to find the replacement, but there's no link to that page from the main rules page.

What do you think is the correct solution?

I'd like the ESLint "rules" page to prominently link to Stylistic on each of the deprecated rules for which that would be appropriate. Perhaps the links to the deprecated rules' doc pages should be restored too?

Participation

  • I am willing to submit a pull request for this change.

Additional comments

(I'm only reluctant to submit a pull request because I am not convinced I know how to efficiently fix all the docs in a way that the project would deem acceptable.)

@danfuzz danfuzz added the documentation Relates to ESLint's documentation label Jan 30, 2024
@Rec0iL99
Copy link
Member

Rec0iL99 commented Jan 30, 2024

Hi @danfuzz, thanks for the issue. Just to confirm, this request is to link to the specific @stylistic plugin rule doc page from the main latest/rules/#deprecated page, right?

Something like this?

Screenshot 2024-01-30 at 2 33 09 PM

Technically, these rules are not replaced by another rule in the core. They have just been moved to a 3rd party plugin. Maybe the wording could be different.

@amareshsm
Copy link
Member

Hi @danfuzz, thanks for the issue. Just to confirm, this request is to link to the specific @stylistic plugin rule doc page from the main latest/rules/#deprecated page, right?

Something like this?

Screenshot 2024-01-30 at 2 33 09 PM Technically, these rules are not replaced by another rule in the core. They have just been moved to a 3rd party plugin. Maybe the wording could be different.

I guess the request is to add both

  1. Link to deprecated docs page
  2. link to the specific @Stylistic plugin rule doc page
    like this:
image

@Tanujkanti4441
Copy link
Contributor

This change is a good idea, otherwise the deprecated rules that are moved to some plugin are not linked anywhere, and the link to the stylistic plugin is inside the individual docs of deprecated rules and one have to use URL to find them.

Instead of replaced by we may write something like 'moved to'
Screenshot 2024-01-31 202134

@bmish
Copy link
Sponsor Member

bmish commented Feb 1, 2024

I'd love to use a rule's meta.deprecated and meta.replacedBy properties to indicate the replacement rule when a rule is moved out of core. I actually wrote up a proposal of how we could support additional information in these properties that would be useful for generating the documentation needed:

As a side note, I actually disagree with the change to remove such information that occurred in:

@Rec0iL99
Copy link
Member

Rec0iL99 commented Feb 5, 2024

ping @eslint/eslint-team

@nzakas
Copy link
Member

nzakas commented Feb 5, 2024

We actually mention the replacement rules on the rule page for all deprecated rules, like this:
https://eslint.org/docs/latest/rules/comma-spacing

So, not opposed to surfacing that information on the rule index page, but we don't have the infrastructure in place to do that right now, so we'd need something like #18061 in place first.

@JoshuaKGoldberg
Copy link
Contributor

JoshuaKGoldberg commented Feb 5, 2024

+1 from me on this issue. Going through https://eslint.org/docs/latest/rules anew, it does feel surprising that there's no link that reaches a page explaining where those rules went.

Additional +1 from me on making the meta.deprecated property richer so these can be more automatically generated.

Edit: heh, posted at about the same time as #18053 (comment). +1 to that.

@nzakas
Copy link
Member

nzakas commented Feb 5, 2024

Just a reminder to everyone on the team: please don't just comment on issues, we should be moving them through the triage board.

Because it seems like there is support for this one the team, I'm marking as accepted as moving to "Blocked" pending #18061

@nzakas nzakas added the accepted There is consensus among the team that this change meets the criteria for inclusion label Feb 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion documentation Relates to ESLint's documentation
Projects
Status: Blocked
Development

No branches or pull requests

7 participants