chore: fix small typos (#26907)

This commit is contained in:
Pooya Parsa 2024-04-23 14:53:11 +02:00 committed by GitHub
parent 9f9e3e6917
commit fdbfed1280
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
23 changed files with 23 additions and 23 deletions

View File

@ -60,7 +60,7 @@ We currently ship an environment for unit testing code that needs a [Nuxt](https
```
::tip
When importing `@nuxt/test-utils` in your vitest config, It is necessary to have `"type": "module"` specified in your `package.json` or rename your vitest config file appropriatly.
When importing `@nuxt/test-utils` in your vitest config, It is necessary to have `"type": "module"` specified in your `package.json` or rename your vitest config file appropriately.
> ie. `vitest.config.m{ts,js}`.
::

View File

@ -10,7 +10,7 @@ The recommended approach for Nuxt is to enable ESLint support using the [`@nuxt/
:::callout{icon="i-ph-lightbulb-duotone"}
The module is designed for the [new ESLint flat config format](https://eslint.org/docs/latest/use/configure/configuration-files-new) with is the [default format since ESLint v9](https://eslint.org/blog/2024/04/eslint-v9.0.0-released/).
If you are using the legacy `.eslintrc` config, you will need to [configure manually with `@nuxt/eslint-config`](https://eslint.nuxt.com/packages/config#legacy-config-format). We highly recommand you to migrate over the flat config to be future-proof.
If you are using the legacy `.eslintrc` config, you will need to [configure manually with `@nuxt/eslint-config`](https://eslint.nuxt.com/packages/config#legacy-config-format). We highly recommend you to migrate over the flat config to be future-proof.
:::
## Quick Setup

View File

@ -18,7 +18,7 @@ export function hasSuffix (path: string, suffix: string) {
export function resolveComponentNameSegments (fileName: string, prefixParts: string[]) {
/**
* Array of fileName parts splitted by case, / or -
* Array of fileName parts split by case, / or -
* @example third-component -> ['third', 'component']
* @example AwesomeComponent -> ['Awesome', 'Component']
*/

View File

@ -146,7 +146,7 @@ describe('treeshake client only in ssr', () => {
expect(treeshaken).toContain('const { ButShouldNotBeTreeShaken } = defineAsyncComponent(async () => {')
expect(treeshaken).toContain('const [ { Dont, }, That] = defineAsyncComponent(async () => {')
// treeshake object that has an assignement pattern
// treeshake object that has an assignment pattern
expect(treeshaken).toContain('const { woooooo, } = defineAsyncComponent(async () => {')
expect(treeshaken).not.toContain('const { Deep, assignment: { Pattern = ofComponent } } = defineAsyncComponent(async () => {')

View File

@ -446,7 +446,7 @@ describe('pages', () => {
expect(html).not.toContain('<p></p>')
expect(html).toContain('hi')
// aysnc setup
// async setup
expect(html).toContain('Work with async setup')
const { page, pageErrors } = await renderPage('/client-fallback')

View File

@ -1,3 +1,3 @@
<template>
<div>This layout should be overriden by bar</div>
<div>This layout should be overridden by bar</div>
</template>

View File

@ -1,3 +1,3 @@
export default defineNuxtRouteMiddleware((to) => {
to.meta.override = 'This middleware should be overriden by bar'
to.meta.override = 'This middleware should be overridden by bar'
})

View File

@ -1,3 +1,3 @@
<template>
<div>This page should be overriden by bar</div>
<div>This page should be overridden by bar</div>
</template>

View File

@ -1,4 +1,4 @@
export function useLifecyleLogs (name: string) {
export function useLifecycleLogs (name: string) {
onMounted(() => console.log(`${name}: onMounted`))
onUnmounted(() => console.log(`${name}: onUnmounted`))
onActivated(() => console.log(`${name}: onActivated`))

View File

@ -1 +1 @@
export const useOverrideableComposable = () => 'test from project'
export const useOverridableComposable = () => 'test from project'

View File

@ -1 +1 @@
export const useOverrideableComposable = () => 'test from layer'
export const useOverridableComposable = () => 'test from layer'

View File

@ -1,3 +1,3 @@
<template>
<div>This component should be overriden by bar</div>
<div>This component should be overridden by bar</div>
</template>

View File

@ -1,3 +1,3 @@
<template>
<div>This layout should be overriden by bar</div>
<div>This layout should be overridden by bar</div>
</template>

View File

@ -1,5 +1,5 @@
<template>
<div>This page should be overriden by bar</div>
<div>This page should be overridden by bar</div>
</template>
<script setup lang="ts">

View File

@ -1,5 +1,5 @@
<template>
<div>
{{ useOverrideableComposable() }}
{{ useOverridableComposable() }}
</div>
</template>

View File

@ -2,7 +2,7 @@
const islandProps = ref({
bool: true,
number: 100,
str: 'helo world',
str: 'hello world',
obj: { json: 'works' },
})

View File

@ -1,5 +1,5 @@
<script setup lang="ts">
useLifecyleLogs('keepalive-in-config')
useLifecycleLogs('keepalive-in-config')
</script>
<template>

View File

@ -1,5 +1,5 @@
<script setup lang="ts">
useLifecyleLogs('keepalive-in-nuxtpage-2')
useLifecycleLogs('keepalive-in-nuxtpage-2')
</script>
<template>

View File

@ -1,5 +1,5 @@
<script setup lang="ts">
useLifecyleLogs('keepalive-in-nuxtpage')
useLifecycleLogs('keepalive-in-nuxtpage')
</script>
<template>

View File

@ -1,5 +1,5 @@
<script setup lang="ts">
useLifecyleLogs('not-keepalive-in-nuxtpage')
useLifecycleLogs('not-keepalive-in-nuxtpage')
</script>
<template>

View File

@ -1,5 +1,5 @@
<script setup lang="ts">
useLifecyleLogs('not-keepalive')
useLifecycleLogs('not-keepalive')
</script>
<template>

View File

@ -37,7 +37,7 @@ beforeEach(() => {
})
describe('runtime server component', () => {
it('expect no data-v- attrbutes #23051', () => {
it('expect no data-v- attributes #23051', () => {
// @ts-expect-error mock
vi.mocked(h).mockImplementation(() => null)

View File

@ -121,7 +121,7 @@ describe('plugin dependsOn', () => {
])
})
it('relying on plugin not registed yet', async () => {
it('relying on plugin not registered yet', async () => {
const nuxtApp = useNuxtApp()
const sequence: string[] = []
const plugins = [