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: Improve id-denylist documentation #16223

Merged
merged 3 commits into from Aug 30, 2022

Conversation

frankie303
Copy link
Contributor

Prerequisites checklist

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

[X] 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
[ ] Other, please explain:

What changes did you make? (Give an overview)

I added a small note to id-denylist documentation to clarify the usage of configuration array. It took me some time to realise the first element of the array specifies the severity of the rule even tough it also seems like one of the disallowed identifiers. So this small addition addresses the confusion. Also you can see this issue which mentioned the same confusion.

Is there anything you'd like reviewers to focus on?

@eslint-github-bot eslint-github-bot bot added the triage An ESLint team member will look at this issue soon label Aug 21, 2022
@eslint-github-bot
Copy link

Hi @frankie303!, thanks for the Pull Request

The first commit message isn't properly formatted. We ask that you update the message to match this format, as we use it to generate changelogs and automate releases.

  • The commit message tag wasn't recognized. Did you mean "docs", "fix", or "feat"?

To Fix: You can fix this problem by running git commit --amend, editing your commit message, and then running git push -f to update this pull request.

Read more about contributing to ESLint here

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Aug 21, 2022

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: frankie303 / name: Mert Ciflikli (ae77177)

@netlify
Copy link

netlify bot commented Aug 21, 2022

Deploy Preview for docs-eslint ready!

Name Link
🔨 Latest commit c426730
🔍 Latest deploy log https://app.netlify.com/sites/docs-eslint/deploys/630da257a472a500082677dd
😎 Deploy Preview https://deploy-preview-16223--docs-eslint.netlify.app/rules/id-denylist
📱 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.

@eslint-github-bot eslint-github-bot bot added the documentation Relates to ESLint's documentation label Aug 21, 2022
@frankie303 frankie303 changed the title doc: Improve id-denylist documentation docs: Improve id-denylist documentation Aug 21, 2022
Copy link
Contributor

@snitin315 snitin315 left a comment

Choose a reason for hiding this comment

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

A similar case was discussed in #11331, but it seems that we didn't open a follow-up issue to enhance the rule page template.

@snitin315 snitin315 added evaluating The team will evaluate this issue to decide whether it meets the criteria for inclusion and removed triage An ESLint team member will look at this issue soon labels Aug 23, 2022
@frankie303
Copy link
Contributor Author

A similar case was discussed in #11331, but it seems that we didn't open a follow-up issue to enhance the rule page template.

I didn't see that issue before and I would definitely suggest to merge one of the PRs. It's clear that this rule causes some confusion for developers. Thanks!

@@ -38,6 +38,8 @@ For example, to restrict the use of common generic identifiers:
}
```

**Note:** First element of the array specifies the severity of the rule and it should be one of the following: 0 = "off", 1 = "warn", 2 = "error". Rest are the disallowed identifiers you want to add.
Copy link
Member

Choose a reason for hiding this comment

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

Instead of restating the values for severity, can we just link to the section on configuring rules in the docs?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi Nicholas, thanks for the feedback! I updated it. Please let me know if I can do further improvement in the sentence.

@frankie303 frankie303 requested a review from nzakas August 27, 2022 10:45
@@ -38,7 +38,7 @@ For example, to restrict the use of common generic identifiers:
}
```

**Note:** First element of the array specifies the severity of the rule and it should be one of the following: 0 = "off", 1 = "warn", 2 = "error". Rest are the disallowed identifiers you want to add.
**Note:** First element of the array is for [rules configuration](https://eslint.org/docs/latest/user-guide/configuring/rules). Rest are the disallowed identifiers you want to add.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
**Note:** First element of the array is for [rules configuration](https://eslint.org/docs/latest/user-guide/configuring/rules). Rest are the disallowed identifiers you want to add.
**Note:** The first element of the array is for the rule severity (see [configuring rules](/docs/latest/user-guide/configuring/rules). The other elements in the array are the identifiers that you want to disallow.

@frankie303 frankie303 requested a review from nzakas August 30, 2022 05:39
Copy link
Member

@nzakas nzakas left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks.

@nzakas nzakas merged commit 279f0af into eslint:main Aug 30, 2022
crapStone pushed a commit to Calciumdibromid/CaBr2 that referenced this pull request Sep 22, 2022
This PR contains the following updates:

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

---

### Release Notes

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

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

[Compare Source](eslint/eslint@v8.23.0...v8.23.1)

#### Bug Fixes

-   [`b719893`](eslint/eslint@b719893) fix: Upgrade eslintrc to stop redefining plugins ([#&#8203;16297](eslint/eslint#16297)) (Brandon Mills)
-   [`734b54e`](eslint/eslint@734b54e) fix: improve autofix for the `prefer-const` rule ([#&#8203;16292](eslint/eslint#16292)) (Nitin Kumar)
-   [`6a923ff`](eslint/eslint@6a923ff) fix: Ensure that glob patterns are normalized ([#&#8203;16287](eslint/eslint#16287)) (Nicholas C. Zakas)
-   [`c6900f8`](eslint/eslint@c6900f8) fix: Ensure globbing doesn't include subdirectories ([#&#8203;16272](eslint/eslint#16272)) (Nicholas C. Zakas)

#### Documentation

-   [`16cba3f`](eslint/eslint@16cba3f) docs: fix mobile double tap issue ([#&#8203;16293](eslint/eslint#16293)) (Sam Chen)
-   [`e098b5f`](eslint/eslint@e098b5f) docs: keyboard control to search results ([#&#8203;16222](eslint/eslint#16222)) (Shanmughapriyan S)
-   [`1b5b2a7`](eslint/eslint@1b5b2a7) docs: add Consolas font and prioritize resource loading ([#&#8203;16225](eslint/eslint#16225)) (Amaresh  S M)
-   [`1ae8236`](eslint/eslint@1ae8236) docs: copy & use main package version in docs on release ([#&#8203;16252](eslint/eslint#16252)) (Jugal Thakkar)
-   [`279f0af`](eslint/eslint@279f0af) docs: Improve id-denylist documentation ([#&#8203;16223](eslint/eslint#16223)) (Mert Ciflikli)

#### Chores

-   [`38e8171`](eslint/eslint@38e8171) perf: migrate rbTree to js-sdsl ([#&#8203;16267](eslint/eslint#16267)) (Zilong Yao)
-   [`1c388fb`](eslint/eslint@1c388fb) chore: switch nyc to c8 ([#&#8203;16263](eslint/eslint#16263)) (唯然)
-   [`67db10c`](eslint/eslint@67db10c) chore: enable linting `.eleventy.js` again ([#&#8203;16274](eslint/eslint#16274)) (Milos Djermanovic)
-   [`42bfbd7`](eslint/eslint@42bfbd7) chore: fix `npm run perf` crashes ([#&#8203;16258](eslint/eslint#16258)) (唯然)

</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).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzMi4xOTQuNSIsInVwZGF0ZWRJblZlciI6IjMyLjE5NC41In0=-->

Co-authored-by: cabr2-bot <cabr2.help@gmail.com>
Reviewed-on: https://codeberg.org/Calciumdibromid/CaBr2/pulls/1543
Reviewed-by: Epsilon_02 <epsilon_02@noreply.codeberg.org>
Co-authored-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org>
Co-committed-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org>
@eslint-github-bot eslint-github-bot bot locked and limited conversation to collaborators Feb 27, 2023
@eslint-github-bot eslint-github-bot bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Feb 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
archived due to age This issue has been archived; please open a new issue for any further discussion documentation Relates to ESLint's documentation evaluating The team will evaluate this issue to decide whether it meets the criteria for inclusion
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants