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

fix(docs): consistent style of configuration examples #12037

Closed
wants to merge 1 commit into from
Closed

fix(docs): consistent style of configuration examples #12037

wants to merge 1 commit into from

Conversation

mrazauskas
Copy link
Contributor

Summary

Configuration examples in the configuration API docs currently differ in syntax / style. Most of them are simply JSON snippets, some include "jest" key, others are written in CJS syntax. All are correctly working, but consistency is missing.

The docs have more consistency issues, but the focus of this PR is on the snippets and related matter:

  • convert all the snippets to JSON (omitting "jest" key). It seemed least verbose and most reasonable. Copy-pasting into any other syntax works smoothly.
  • add missing and improve few file names.
  • remove sometimes redundant Example subtitle. Seemed like context or file name is sufficient.
  • and few minor details (like missing dot or so).

Test plan

N/A

authorize: () => {
return 'token';
},
authorize: () => 'token',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Synced with the code from examples folder.

@mrazauskas
Copy link
Contributor Author

On second thought, that JSON syntax of config snippets looks rather exotic in the JS ecosystem. Just try converting them to JS (with export skipped). Much better! Also more clean and more in tune with the context.

Only the eslint / prettier duo is unhappy now. So I will negotiate with them.

@mrazauskas mrazauskas marked this pull request as draft November 5, 2021 08:12
@SimenB
Copy link
Member

SimenB commented Nov 29, 2021

@mrazauskas ping 😀 Would be wonderful to clean this up

@mrazauskas mrazauskas deleted the docs-configuration-examples branch May 19, 2022 06:35
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants