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: Add configuration comments in examples #13738

Merged
merged 3 commits into from Oct 6, 2020

Conversation

yeonjuan
Copy link
Member

@yeonjuan yeonjuan commented Oct 5, 2020

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 autofixing 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 missing configuration comments in the documents. It's quite useful for a quick demo :)

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

no.

@eslint-deprecated eslint-deprecated bot added the triage An ESLint team member will look at this issue soon label Oct 5, 2020
@yeonjuan yeonjuan added accepted There is consensus among the team that this change meets the criteria for inclusion documentation Relates to ESLint's documentation rule Relates to ESLint's core rules and removed triage An ESLint team member will look at this issue soon labels Oct 5, 2020
Copy link
Member

@mdjermanovic mdjermanovic left a comment

Choose a reason for hiding this comment

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

Nice catch!

The PR is correct, but it looks like some examples were not :)

Comment on lines 29 to 36
Examples of **incorrect** code for this rule:

```js
/*eslint no-unmodified-loop-condition: "error"*/

while (node) {
doSomething(node);
}
Copy link
Member

Choose a reason for hiding this comment

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

This doesn't seem to work in the demo (at least when I try), maybe the variables have to be declared?

@yeonjuan if this really should be fixed, what do you think about doing that in this PR or in another PR?

Copy link
Member Author

@yeonjuan yeonjuan Oct 6, 2020

Choose a reason for hiding this comment

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

if this really should be fixed, what do you think about doing that in this PR or in another PR?

@mdjermanovic I think doing in this PR nice. I fixed it. Thanks 👍

Copy link
Member

Choose a reason for hiding this comment

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

Thanks! The example with for-loop also doesn't work, but that seems to be a more complex problem for another PR. I'm not sure what was the expected behavior.

Copy link
Member

@mdjermanovic mdjermanovic 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!

@mdjermanovic mdjermanovic merged commit fe301b8 into master Oct 6, 2020
@mdjermanovic mdjermanovic deleted the docs-addeslintcomment branch October 6, 2020 11:22
@eslint-github-bot eslint-github-bot bot locked and limited conversation to collaborators Apr 5, 2021
@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 Apr 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion archived due to age This issue has been archived; please open a new issue for any further discussion documentation Relates to ESLint's documentation rule Relates to ESLint's core rules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants