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: use lowercase typings, use | instead of or in type declaration #2167

Merged
merged 3 commits into from Jul 17, 2023
Merged

docs: use lowercase typings, use | instead of or in type declaration #2167

merged 3 commits into from Jul 17, 2023

Conversation

nobkd
Copy link
Contributor

@nobkd nobkd commented Jul 12, 2023

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

Other declarations follow the same schema.

@nuxt-studio
Copy link

nuxt-studio bot commented Jul 12, 2023

βœ… Live Preview ready!

Name Edit Preview Latest Commit
content Edit on Studio β†—οΈŽ View Live Preview 282014a

@netlify
Copy link

netlify bot commented Jul 12, 2023

βœ… Deploy Preview for nuxt-content ready!

Built without sensitive environment variables

Name Link
πŸ”¨ Latest commit 282014a
πŸ” Latest deploy log https://app.netlify.com/sites/nuxt-content/deploys/64b12e14f72b170008b385d1
😎 Deploy Preview https://deploy-preview-2167--nuxt-content.netlify.app
πŸ“± 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 configuration.

@nuxt-studio
Copy link

nuxt-studio bot commented Jul 12, 2023

βœ… Live Preview ready!

Name Edit Preview Latest Commit
content Edit on Studio β†—οΈŽ View Live Preview 770b604

@nobkd
Copy link
Contributor Author

nobkd commented Jul 12, 2023

I've also seen that sometimes the types begin with a capital letter and sometimes they don't.

E.g. here

| Option | Type | Description |
| ----------------- | :-----------------: | :------------------------------------------------------------- |
| `page` | `Boolean` | Enables the page binding, making it globally accessible. |
| `navigation` | `Boolean` | Enables the navigation binding, making it globally accessible. |
| `surround` | `Boolean` | Enables the surround binding, making it globally accessible. |
| `globals` | `Object \| Boolean` | A list of globals to be made available globally. |
| `layoutFallbacks` | `string[]` | A list of `globals` key to use to find a layout fallback. |
| `injectPage` | `boolean` | Inject `[...slug].vue` pre-configured page |
| `trailingSlash` | `boolean` | Add a slash at the end of `canonical` and `og:url` |

See Boolean vs boolean.
This also happens with other default types.

I think they should all use lowercase letters, as that's the way they're used in code.

The types I talk about are number, string, boolean, object etc. and their array variants.

What do you think?

@Atinux
Copy link
Member

Atinux commented Jul 12, 2023

Ok for me to have all lowercase, happy to update it on this PR?

@nobkd
Copy link
Contributor Author

nobkd commented Jul 12, 2023

Sure. Will do that

@nobkd nobkd changed the title docs: use | instead of or in type declaration docs: use lowercase typings, use | instead of or in type declaration Jul 12, 2023
@nobkd
Copy link
Contributor Author

nobkd commented Jul 12, 2023

I updated the typings for Content v2 now.
Should I change them for v1 too?

Copy link
Member

@farnabaz farnabaz left a comment

Choose a reason for hiding this comment

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

Thanks πŸ‘

@farnabaz
Copy link
Member

Should I change them for v1 too?

It would be great if you do so πŸ‘

@nobkd nobkd mentioned this pull request Jul 15, 2023
7 tasks
@farnabaz farnabaz merged commit 12a90c4 into nuxt:main Jul 17, 2023
7 checks passed
@farnabaz
Copy link
Member

Thanks @nobkd ❀️

@nobkd nobkd deleted the patch-1 branch July 17, 2023 13:03
@farnabaz farnabaz mentioned this pull request Jul 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants