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: Remove duplicate rule descriptions #16052

Merged
merged 6 commits into from Jun 30, 2022

Conversation

amareshsm
Copy link
Member

@amareshsm amareshsm commented Jun 24, 2022

Prerequisites checklist

What is the purpose of this pull request? (put an "X" next to an item)

[ ] Documentation update
[ ] Bug fix (template)
[ ] New rule (template)
[ ] Changes an existing rule (template)
[ ] Add autofix to a rule
[ ] Add a CLI option
[ ] Add something to the core
[x] Other, please explain:
Ref: #16051

@eslint-github-bot eslint-github-bot bot added triage An ESLint team member will look at this issue soon documentation Relates to ESLint's documentation labels Jun 24, 2022
@netlify
Copy link

@netlify netlify bot commented Jun 24, 2022

Deploy Preview for docs-eslint ready!

Name Link
🔨 Latest commit 607dc33
🔍 Latest deploy log https://app.netlify.com/sites/docs-eslint/deploys/62bcaa98b0b0a20008995d38
😎 Deploy Preview https://deploy-preview-16052--docs-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.

@amareshsm
Copy link
Member Author

@amareshsm amareshsm commented Jun 24, 2022

function generateRuleIndexPage() {

Do we need to update capitalizing the description logic in generateRuleIndexPage function ?

@nzakas
Copy link
Member

@nzakas nzakas commented Jun 25, 2022

I would rather capitalize the description in the rules themselves so it carries through everywhere.

@amareshsm
Copy link
Member Author

@amareshsm amareshsm commented Jun 25, 2022

I would rather capitalize the description in the rules themselves so it carries through everywhere.

        docs: {
            description: "Enforce getter and setter pairs in objects and classes",
            recommended: false,
            url: "https://eslint.org/docs/rules/accessor-pairs"
        }

Like this in the rule file itself? In this case eslint-plugin/require-meta-docs-description lint rule will throw error for invalid description.

 error  `meta.docs.description` must match the regexp /^(enforce|require|disallow)/  eslint-plugin/require-meta-docs-description

How can we handle this?

P.S. Not sure my understanding is correct. Correct me if am wrong.

@harish-sethuraman
Copy link
Member

@harish-sethuraman harish-sethuraman commented Jun 25, 2022

Like this in the rule file itself

I see that you already have those file changes for changing to caps in rules.json?

when and where is it throwing error?

I suppose this is coming from here. We might either want to send a PR there (might become a breaking change for that plugin? ) or add logic in our code.

@amareshsm
Copy link
Member Author

@amareshsm amareshsm commented Jun 25, 2022

Like this in the rule file itself

I see that you already have those file changes for changing to caps in rules.json?

when and where is it throwing error?

I suppose this is coming from here. We might either want to send a PR there (might become a breaking change for that plugin? ) or add logic in our code.

Currently, not getting any errors. If we update the description in the rule files will get the lint error.

@mdjermanovic
Copy link
Member

@mdjermanovic mdjermanovic commented Jun 25, 2022

Like this in the rule file itself? In this case eslint-plugin/require-meta-docs-description lint rule will throw error for invalid description.

 error  `meta.docs.description` must match the regexp /^(enforce|require|disallow)/  eslint-plugin/require-meta-docs-description

How can we handle this?

This rule is configurable. You can set a different pattern in configuration for this rule, which is here:

"eslint-plugin/require-meta-docs-description": "error",

@amareshsm
Copy link
Member Author

@amareshsm amareshsm commented Jun 25, 2022

Like this in the rule file itself? In this case eslint-plugin/require-meta-docs-description lint rule will throw error for invalid description.

 error  `meta.docs.description` must match the regexp /^(enforce|require|disallow)/  eslint-plugin/require-meta-docs-description

How can we handle this?

This rule is configurable. You can set a different pattern in configuration for this rule, which is here:

"eslint-plugin/require-meta-docs-description": "error",

Thanks. Changes Done.

description: "doublequote"
description: "Doublequote"
Copy link
Member

@mdjermanovic mdjermanovic Jun 25, 2022

Choose a reason for hiding this comment

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

It seems that this was mistakenly changed and that's why the tests are failing.

Copy link
Member Author

@amareshsm amareshsm Jun 26, 2022

Choose a reason for hiding this comment

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

Thanks, changed.

description: "singlequote",
description: "Singlequote",
Copy link
Member

@mdjermanovic mdjermanovic Jun 25, 2022

Choose a reason for hiding this comment

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

Same here.

@@ -6,7 +6,6 @@ further_reading:
- https://leanpub.com/understandinges6/read/#leanpub-auto-generators
---

Enforces consistent spacing around the asterisk in generator functions.
Copy link
Member

@mdjermanovic mdjermanovic Jun 25, 2022

Choose a reason for hiding this comment

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

I think we should keep descriptions in the docs for removed rules because they don't have descriptions from rules meta.

Copy link
Member

@mdjermanovic mdjermanovic Jun 27, 2022

Choose a reason for hiding this comment

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

Can you also restore descriptions in other removed rules? You can find the list of removed rules here:

"removed": {
"name": "Removed",
"description": "These rules from older versions of ESLint (before the <a href=\"/docs/user-guide/rule-deprecation\">deprecation policy</a> existed) have been replaced by newer rules:",
"rules": [
{ "removed": "generator-star", "replacedBy": ["generator-star-spacing"] },
{ "removed": "global-strict", "replacedBy": ["strict"] },
{ "removed": "no-arrow-condition", "replacedBy": ["no-confusing-arrow", "no-constant-condition"] },
{ "removed": "no-comma-dangle", "replacedBy": ["comma-dangle"] },
{ "removed": "no-empty-class", "replacedBy": ["no-empty-character-class"] },
{ "removed": "no-empty-label", "replacedBy": ["no-labels"] },
{ "removed": "no-extra-strict", "replacedBy": ["strict"] },
{ "removed": "no-reserved-keys", "replacedBy": ["quote-props"] },
{ "removed": "no-space-before-semi", "replacedBy": ["semi-spacing"] },
{ "removed": "no-wrap-func", "replacedBy": ["no-extra-parens"] },
{ "removed": "space-after-function-name", "replacedBy": ["space-before-function-paren"] },
{ "removed": "space-after-keywords", "replacedBy": ["keyword-spacing"] },
{ "removed": "space-before-function-parentheses", "replacedBy": ["space-before-function-paren"] },
{ "removed": "space-before-keywords", "replacedBy": ["keyword-spacing"] },
{ "removed": "space-in-brackets", "replacedBy": ["object-curly-spacing", "array-bracket-spacing"] },
{ "removed": "space-return-throw-case", "replacedBy": ["keyword-spacing"] },
{ "removed": "space-unary-word-ops", "replacedBy": ["space-unary-ops"] },
{ "removed": "spaced-line-comment", "replacedBy": ["spaced-comment"] }
]
}

Copy link
Member Author

@amareshsm amareshsm Jun 27, 2022

Choose a reason for hiding this comment

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

sure I will restore it.

Copy link
Member Author

@amareshsm amareshsm Jun 29, 2022

Choose a reason for hiding this comment

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

Restored descriptions for removed rules.

@snitin315 snitin315 linked an issue Jun 27, 2022 that may be closed by this pull request
@mdjermanovic mdjermanovic added accepted There is consensus among the team that this change meets the criteria for inclusion and removed triage An ESLint team member will look at this issue soon labels Jun 27, 2022
Copy link
Member

@mdjermanovic mdjermanovic left a comment

LGTM, thanks!

I'll leave this open if someone else wants to take a look.

Since these descriptions now start in capital letters, they look like all other paragraphs, so I'm not sure if we might want to add a . to complete the sentence, or plan to style this differently in a follow-up.

image

nzakas
nzakas approved these changes Jun 30, 2022
Copy link
Member

@nzakas nzakas left a comment

LGTM. Just waiting for @mdjermanovic to give the 👍

@nzakas
Copy link
Member

@nzakas nzakas commented Jun 30, 2022

Oops beat me to it! Let’s merge this and look at the periods separately.

@nzakas nzakas merged commit 3ae0574 into eslint:main Jun 30, 2022
20 checks passed
@harish-sethuraman
Copy link
Member

@harish-sethuraman harish-sethuraman commented Jun 30, 2022

Oops beat me to it! Let’s merge this and look at the periods separately.

Are we looking to add periods for all rules in json or can we do that via template? I can take this up

crapStone pushed a commit to Calciumdibromid/CaBr2 that referenced this issue Jul 4, 2022
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [eslint](https://eslint.org) ([source](https://github.com/eslint/eslint)) | devDependencies | minor | [`8.18.0` -> `8.19.0`](https://renovatebot.com/diffs/npm/eslint/8.18.0/8.19.0) |

---

### Release Notes

<details>
<summary>eslint/eslint</summary>

### [`v8.19.0`](https://github.com/eslint/eslint/releases/tag/v8.19.0)

[Compare Source](eslint/eslint@v8.18.0...v8.19.0)

#### Features

-   [`7023628`](eslint/eslint@7023628) feat: add importNames support for patterns in no-restricted-imports ([#&#8203;16059](eslint/eslint#16059)) (Brandon Scott)
-   [`472c368`](eslint/eslint@472c368) feat: fix handling of blockless `with` statements in indent rule ([#&#8203;16068](eslint/eslint#16068)) (Milos Djermanovic)

#### Bug Fixes

-   [`fc81848`](eslint/eslint@fc81848) fix: throw helpful exception when rule has wrong return type ([#&#8203;16075](eslint/eslint#16075)) (Bryan Mishkin)

#### Documentation

-   [`3ae0574`](eslint/eslint@3ae0574) docs: Remove duplicate rule descriptions ([#&#8203;16052](eslint/eslint#16052)) (Amaresh  S M)
-   [`f50cf43`](eslint/eslint@f50cf43) docs: Add base href to each page to fix relative URLs ([#&#8203;16046](eslint/eslint#16046)) (Nicholas C. Zakas)
-   [`ae4b449`](eslint/eslint@ae4b449) docs: make logo link clickable on small width screens ([#&#8203;16058](eslint/eslint#16058)) (Milos Djermanovic)
-   [`280f898`](eslint/eslint@280f898) docs: use only fenced code blocks ([#&#8203;16044](eslint/eslint#16044)) (Milos Djermanovic)
-   [`f5d63b9`](eslint/eslint@f5d63b9) docs: add listener only if element exists ([#&#8203;16045](eslint/eslint#16045)) (Amaresh  S M)
-   [`8b639cc`](eslint/eslint@8b639cc) docs: add missing migrating-to-8.0.0 in the user guide ([#&#8203;16048](eslint/eslint#16048)) (唯然)
-   [`b8e68c1`](eslint/eslint@b8e68c1) docs: Update release process ([#&#8203;16036](eslint/eslint#16036)) (Nicholas C. Zakas)
-   [`6d0cb11`](eslint/eslint@6d0cb11) docs: remove table of contents from markdown text ([#&#8203;15999](eslint/eslint#15999)) (Nitin Kumar)

#### Chores

-   [`e884933`](eslint/eslint@e884933) chore: use `github-slugger` for markdown anchors ([#&#8203;16067](eslint/eslint#16067)) (Strek)
-   [`02e9cb0`](eslint/eslint@02e9cb0) chore: revamp carbon ad style ([#&#8203;16078](eslint/eslint#16078)) (Amaresh  S M)
-   [`b6aee95`](eslint/eslint@b6aee95) chore: remove unwanted comments from rules markdown ([#&#8203;16054](eslint/eslint#16054)) (Strek)
-   [`6840940`](eslint/eslint@6840940) chore: correctly use .markdownlintignore in Makefile ([#&#8203;16060](eslint/eslint#16060)) (Bryan Mishkin)
-   [`48904fb`](eslint/eslint@48904fb) chore: add missing images ([#&#8203;16017](eslint/eslint#16017)) (Amaresh  S M)
-   [`910f741`](eslint/eslint@910f741) chore: add architecture to nav ([#&#8203;16039](eslint/eslint#16039)) (Strek)
-   [`9bb24c1`](eslint/eslint@9bb24c1) chore: add correct incorrect in all rules doc ([#&#8203;16021](eslint/eslint#16021)) (Deepshika S)
-   [`5a96af8`](eslint/eslint@5a96af8) chore: prepare versions data file ([#&#8203;16035](eslint/eslint#16035)) (Nicholas C. Zakas)
-   [`50afe6f`](eslint/eslint@50afe6f) chore: Included githubactions in the dependabot config ([#&#8203;15985](eslint/eslint#15985)) (Naveen)
-   [`473411e`](eslint/eslint@473411e) chore: add deploy workflow for playground ([#&#8203;16034](eslint/eslint#16034)) (Milos Djermanovic)
-   [`a30b66c`](eslint/eslint@a30b66c) chore: fix print style ([#&#8203;16025](eslint/eslint#16025)) (Amaresh  S M)
-   [`f4dad59`](eslint/eslint@f4dad59) chore: add noindex meta tag ([#&#8203;16016](eslint/eslint#16016)) (Milos Djermanovic)
-   [`db387a8`](eslint/eslint@db387a8) chore: fix sitemap ([#&#8203;16026](eslint/eslint#16026)) (Milos Djermanovic)
-   [`285fbc5`](eslint/eslint@285fbc5) chore: remove TOC from printable ([#&#8203;16020](eslint/eslint#16020)) (Strek)
-   [`8e84c21`](eslint/eslint@8e84c21) chore: remove ligatures from fonts ([#&#8203;16019](eslint/eslint#16019)) (Strek)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

 **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox.

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).

Co-authored-by: cabr2-bot <cabr2.help@gmail.com>
Reviewed-on: https://codeberg.org/Calciumdibromid/CaBr2/pulls/1444
Reviewed-by: 6543 <6543@noreply.codeberg.org>
Co-authored-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org>
Co-committed-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org>
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
None yet
Development

Successfully merging this pull request may close these issues.

4 participants