Alejandro Mery
Alejandro Mery
Explore posts from servers
NNuxt
Created by Alejandro Mery on 5/6/2024 in #❓・help
create stricter type
what's the right way to create a type using the actual field names of an object that is currently { [x:string]: Foo }? will keyof typeof actually do the magic?
27 replies
NNuxt
Created by Alejandro Mery on 4/13/2024 in #❓・help
type checking custom AppConfig entries
https://nuxt.com/docs/guide/directory-structure/app-config#app-config-output tells to use declare module to extend nuxt/schema's AppConfigInput on the index.d.ts file... where is that? I tried in src/composables/useFoo.ts instead, src/composables/index.d.ts and src/index.d.ts, but neither validates my custom entry in app.config.ts. where should this be done I? what if there are other declarations and exports on the same file?
40 replies
NNuxt
Created by Alejandro Mery on 4/5/2024 in #❓・help
tailwindcss grid container
using @nuxt/ui (tailwindcss) I have a <u-dashboard-panel-content /> containing two "h-[50%]" cards and I would like each having their default slot used by a grid made by columns occupying all the available space but overflow-x-scroll. for this I have this structure inside a the card but anything I try either ends in a single row or the ul overflowing. could you enlighten me on how is this usually solved?
<div class="overflow-x-scroll"><!-- flex-1 within the card -->
<ul><!-- grid grid-col -->
<li v-for><my-indicator /></li><!-- fixed reactive size grid cells -->
</ul>
</div>
<div class="overflow-x-scroll"><!-- flex-1 within the card -->
<ul><!-- grid grid-col -->
<li v-for><my-indicator /></li><!-- fixed reactive size grid cells -->
</ul>
</div>
my next goal is to manage the overflow using dynamic tabs or pagination
1 replies
NNuxt
Created by Alejandro Mery on 4/2/2024 in #❓・help
FetchError type
I've seen import type { FetchError } from 'ofetch', what what's the correct module when handling useFetch() errors?
24 replies
NNuxt
Created by Alejandro Mery on 4/2/2024 in #❓・help
UDashboardPanel footer (@nuxt/ui-pro)
I'm trying to put a footer on the main (grow enabled) panel but I can't get the css right. in the following example I would like the footer to be at the bottom of the screen when NuxtPage is short, but not floating over the content when it's large. suggestions?
<u-dashboard-panel grow>
<u-dashboard-panel-content class="overflow-y-scroll py-2">
<NuxtPage />
<app-dashboard-footer />
</u-dashboard-panel-content>
</u-dashboard-panel>
<u-dashboard-panel grow>
<u-dashboard-panel-content class="overflow-y-scroll py-2">
<NuxtPage />
<app-dashboard-footer />
</u-dashboard-panel-content>
</u-dashboard-panel>
3 replies
NNuxt
Created by Alejandro Mery on 4/2/2024 in #❓・help
@nuxt/eslint autofix?
when using @nuxt/eslint instead of the old @nuxtjs/eslint-module how does one enable autofix? NuxtConfig.eslint only takes checker and config but neither seems to support fix: boolean do I have to instantiate my own vite plugin?
eslint: {
checker: {
lintOnStart: autoFix,
fix: autoFix, // <--- invalid
},
config: {
stylistic: true,
},
},
eslint: {
checker: {
lintOnStart: autoFix,
fix: autoFix, // <--- invalid
},
config: {
stylistic: true,
},
},
2 replies
NNuxt
Created by Alejandro Mery on 4/1/2024 in #❓・help
eslint vs typescript 5.4
5.4.3 is being pulled by nuxt but eslint doesn't like it even if I explictly install the latest vite-plugin-eslint@latest and @typescript-eslint/typescript-estree. any idea what else needs upgrading?
WARN warning: LintOnStart is turned on, and it will check for all matching files.
Plugin: vite-plugin-eslint

=============

WARNING: You are currently running a version of TypeScript which is not officially supported by @typescript-eslint/typescript-estree.

You may find that it works just fine, or you may not.

SUPPORTED TYPESCRIPT VERSIONS: >=4.3.5 <5.4.0

YOUR TYPESCRIPT VERSION: 5.4.3

Please only submit bug reports when using the officially supported version.

=============
WARN warning: LintOnStart is turned on, and it will check for all matching files.
Plugin: vite-plugin-eslint

=============

WARNING: You are currently running a version of TypeScript which is not officially supported by @typescript-eslint/typescript-estree.

You may find that it works just fine, or you may not.

SUPPORTED TYPESCRIPT VERSIONS: >=4.3.5 <5.4.0

YOUR TYPESCRIPT VERSION: 5.4.3

Please only submit bug reports when using the officially supported version.

=============
18 replies