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: Fix JS syntax and doc URL in working-with-custom-formatters.md #13828

Merged
merged 2 commits into from Nov 18, 2020

Conversation

nostalic
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 autofixing to a rule
[ ] Add a CLI option
[ ] Add something to the core
[ ] Other, please explain:

What changes did you make? (Give an overview)

Fix a minor JS typo in the custom formatter documentation sample for detailed formatter which causes a syntax error https://eslint.org/docs/developer-guide/working-with-custom-formatters#detailed-formatter

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

@eslint-deprecated eslint-deprecated bot added the triage An ESLint team member will look at this issue soon label Nov 10, 2020
@eslint-deprecated
Copy link

Hi @nostalic!, 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 must be one of the following:

    The Tag is one of the following:

    • Fix - for a bug fix.
    • Update - either for a backwards-compatible enhancement or for a rule change that adds reported problems.
    • New - implements a new feature.
    • Breaking - for a backwards-incompatible enhancement or feature.
    • Docs - changes to documentation only.
    • Build - changes to build process only.
    • Upgrade - for a dependency upgrade.
    • Chore - for anything that isn't user-facing (for example, refactoring, adding tests, etc.).

    You can use the labels of the issue you are working on to determine the best tag.

  • There should be a space following the initial tag and colon, for example 'New: Message'.

Read more about contributing to ESLint here

@nostalic nostalic changed the title Fix JS syntax in working-with-custom-formatters.md Docs: Fix JS syntax in working-with-custom-formatters.md Nov 10, 2020
@eslint-deprecated
Copy link

Hi @nostalic!, 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 must be one of the following:

    The Tag is one of the following:

    • Fix - for a bug fix.
    • Update - either for a backwards-compatible enhancement or for a rule change that adds reported problems.
    • New - implements a new feature.
    • Breaking - for a backwards-incompatible enhancement or feature.
    • Docs - changes to documentation only.
    • Build - changes to build process only.
    • Upgrade - for a dependency upgrade.
    • Chore - for anything that isn't user-facing (for example, refactoring, adding tests, etc.).

    You can use the labels of the issue you are working on to determine the best tag.

  • There should be a space following the initial tag and colon, for example 'New: Message'.

Read more about contributing to ESLint here

@nostalic
Copy link
Contributor Author

@snitin315 I had to push the change again due to the commit message check - no code changes involved.

Could you please review and approve again if correct? thanks!

@nostalic nostalic marked this pull request as draft November 10, 2020 15:12
Missing parenthesis on ruleUrl causing syntax error in detailed formatter
@nostalic nostalic marked this pull request as ready for review November 14, 2020 07:47
@mdjermanovic mdjermanovic added accepted There is consensus among the team that this change meets the criteria for inclusion documentation Relates to ESLint's documentation and removed triage An ESLint team member will look at this issue soon labels Nov 18, 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.

@nostalic thanks for the PR!

The change looks good, but formatter still isn't working as intended because there was another "bug".

Can you please also change line 198:

- ruleUrl: data.rulesMeta[msg.ruleId].url,
+ ruleUrl: data.rulesMeta[msg.ruleId].docs.url,

ruleUrl needs to get URL from the docs object
@nostalic nostalic changed the title Docs: Fix JS syntax in working-with-custom-formatters.md Docs: Fix JS syntax and doc URL in working-with-custom-formatters.md Nov 18, 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.

LGTM, thanks! Now it produces output that looks like the example at the end of this section.

@mdjermanovic mdjermanovic changed the title Docs: Fix JS syntax and doc URL in working-with-custom-formatters.md Docs: Fix JS syntax and doc URL in working-with-custom-formatters.md Nov 18, 2020
@mdjermanovic
Copy link
Member

Just removed an extra space from the end of the PR title.

@mdjermanovic mdjermanovic merged commit 042ae44 into eslint:master Nov 18, 2020
@mdjermanovic
Copy link
Member

Thanks for contributing!

@nostalic nostalic deleted the patch-1 branch November 18, 2020 21:26
@eslint-github-bot eslint-github-bot bot locked and limited conversation to collaborators May 18, 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 May 18, 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants