From f7b13427cf79a0e51c40bc4361ecf8542b0562aa Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Tue, 5 Sep 2023 12:02:12 +0100 Subject: [PATCH] chore: lint --- packages/nuxt/src/app/components/client-fallback.client.ts | 1 - packages/nuxt/src/app/components/nuxt-error-page.vue | 1 - packages/nuxt/src/app/components/nuxt-layout.ts | 3 +-- packages/nuxt/src/app/components/nuxt-loading-indicator.ts | 1 - packages/nuxt/src/app/components/route-provider.ts | 2 -- 5 files changed, 1 insertion(+), 7 deletions(-) diff --git a/packages/nuxt/src/app/components/client-fallback.client.ts b/packages/nuxt/src/app/components/client-fallback.client.ts index 2f32e0530c..d1f249ba3f 100644 --- a/packages/nuxt/src/app/components/client-fallback.client.ts +++ b/packages/nuxt/src/app/components/client-fallback.client.ts @@ -31,7 +31,6 @@ export default defineComponent({ setup (props, ctx) { const mounted = ref(false) // This is deliberate - `uid` should not be provided by user but by a transform plugin and will not be reactive. - // eslint-disable-next-line vue/no-setup-props-destructure const ssrFailed = useState(`${props.uid}`) if (ssrFailed.value) { diff --git a/packages/nuxt/src/app/components/nuxt-error-page.vue b/packages/nuxt/src/app/components/nuxt-error-page.vue index cf32d26835..d3fa6e2636 100644 --- a/packages/nuxt/src/app/components/nuxt-error-page.vue +++ b/packages/nuxt/src/app/components/nuxt-error-page.vue @@ -10,7 +10,6 @@ const props = defineProps({ }) // Deliberately prevent reactive update when error is cleared -// eslint-disable-next-line vue/no-setup-props-destructure const _error = props.error // TODO: extract to a separate utility diff --git a/packages/nuxt/src/app/components/nuxt-layout.ts b/packages/nuxt/src/app/components/nuxt-layout.ts index 752978b2ab..2b19a8d6d5 100644 --- a/packages/nuxt/src/app/components/nuxt-layout.ts +++ b/packages/nuxt/src/app/components/nuxt-layout.ts @@ -26,7 +26,6 @@ const LayoutLoader = defineComponent({ // This is a deliberate hack - this component must always be called with an explicit key to ensure // that setup reruns when the name changes. - // eslint-disable-next-line vue/no-setup-props-destructure const LayoutComponent = await layouts[props.name]().then((r: any) => r.default || r) return () => h(LayoutComponent, props.layoutProps, context.slots) @@ -103,7 +102,7 @@ const LayoutProvider = defineComponent({ }, setup (props, context) { // Prevent reactivity when the page will be rerendered in a different suspense fork - // eslint-disable-next-line vue/no-setup-props-destructure + const name = props.name if (props.shouldProvide) { provide(LayoutMetaSymbol, { diff --git a/packages/nuxt/src/app/components/nuxt-loading-indicator.ts b/packages/nuxt/src/app/components/nuxt-loading-indicator.ts index 01cf194bb2..a3ee0c937a 100644 --- a/packages/nuxt/src/app/components/nuxt-loading-indicator.ts +++ b/packages/nuxt/src/app/components/nuxt-loading-indicator.ts @@ -27,7 +27,6 @@ export default defineComponent({ }, setup (props, { slots }) { // TODO: use computed values in useLoadingIndicator - // eslint-disable-next-line vue/no-setup-props-destructure const indicator = useLoadingIndicator({ duration: props.duration, throttle: props.throttle diff --git a/packages/nuxt/src/app/components/route-provider.ts b/packages/nuxt/src/app/components/route-provider.ts index 5db44c3f79..96a2bf0296 100644 --- a/packages/nuxt/src/app/components/route-provider.ts +++ b/packages/nuxt/src/app/components/route-provider.ts @@ -20,9 +20,7 @@ export const RouteProvider = defineComponent({ }, setup (props) { // Prevent reactivity when the page will be rerendered in a different suspense fork - // eslint-disable-next-line vue/no-setup-props-destructure const previousKey = props.renderKey - // eslint-disable-next-line vue/no-setup-props-destructure const previousRoute = props.route // Provide a reactive route within the page