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 label Oct 5, 2020
@yeonjuan yeonjuan added accepted documentation rule and removed triage labels Oct 5, 2020
Copy link
Member

@mdjermanovic mdjermanovic left a comment

Nice catch!

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

Examples of **incorrect** code for this rule:

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

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

@mdjermanovic mdjermanovic Oct 5, 2020

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

@mdjermanovic mdjermanovic Oct 6, 2020

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

LGTM, thanks!

@mdjermanovic mdjermanovic merged commit fe301b8 into master Oct 6, 2020
10 of 12 checks passed
@mdjermanovic mdjermanovic deleted the docs-addeslintcomment branch Oct 6, 2020
@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 label Apr 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accepted archived due to age documentation rule
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants