Yuri
Yuri
NNuxt
Created by Yuri on 11/9/2024 in #❓・help
eslint ignore
My esling.config.mjs:
import tailwind from 'eslint-plugin-tailwindcss'
import { defineFlatConfig } from 'eslint-flat-config-utils'
import withNuxt from './.nuxt/eslint.config.mjs'

export default withNuxt(
defineFlatConfig({
ignores: ['./android/**', './ios/**'],
}),
tailwind.configs['flat/recommended'],
)
import tailwind from 'eslint-plugin-tailwindcss'
import { defineFlatConfig } from 'eslint-flat-config-utils'
import withNuxt from './.nuxt/eslint.config.mjs'

export default withNuxt(
defineFlatConfig({
ignores: ['./android/**', './ios/**'],
}),
tailwind.configs['flat/recommended'],
)
But when I start task lint I receive such error: C:\work\shop**android**\app\build\intermediates\assets\debug\native-bridge.js 4:5 error 'nativeBridge' is assigned a value but never used no-unused-vars How can I exclude android & ios folders from linter?
7 replies
NNuxt
Created by Yuri on 11/3/2024 in #❓・help
Eslint Ignore
I use "@nuxt/eslint": "^0.5.7". What is correct method to add ignore rules to eslint.config.js Now my config is:
import tailwind from 'eslint-plugin-tailwindcss'
import withNuxt from './.nuxt/eslint.config.mjs'

export default withNuxt(
...tailwind.configs['flat/recommended'],
)
import tailwind from 'eslint-plugin-tailwindcss'
import withNuxt from './.nuxt/eslint.config.mjs'

export default withNuxt(
...tailwind.configs['flat/recommended'],
)
I need to add a rule for ignore /android path.
5 replies
NNuxt
Created by Yuri on 10/18/2024 in #❓・help
JWT Example Project
Hello. I develop an online store with Nuxt. I used a third part Backend API before. Now I want to use /server/api for it. And inside /server/API/, requests are sending to the necessary services and the database. I plan to sign all requests with the JWT token and I will keep it in the cookie. Does anyone have examples of such real projects to see how it should be set up correctly?
1 replies
NNuxt
Created by Yuri on 10/3/2024 in #❓・help
Mock API
Hello! What can I use for Mock API. Example: It is my /server/api/contacts/ export default defineCachedEventHandler(async (_event) => { const data = await $fetch('https://example.com/contacts'); return { status: 'success', data, }; }, { maxAge: -1 }); How can I return mock data for 'https://example.com/contacts' (It is example url for back API)
1 replies
NNuxt
Created by Yuri on 6/29/2023 in #❓・help
Different tailwind config for desktop and mobile version
I'm using tailwind on my project. I want to separate mobile and desktop layouts. But I can't refuse breakpoints as they are necessary for desktop responsiveness (from 1280 to 1920). But if the mobile version is stretched to 1920 in the browser emulator, then the breakpoints modifiers from the desktop are connected to it. but I wouldn't want that. What can you think of? We have: two very different mobile and desktop versions. Purpose: to use tailwind for class atomicity and desktop adaptability, and in the mobile version only class atomicity. I am sorry for my English. 🙃
10 replies
NNuxt
Created by Yuri on 12/29/2022 in #❓・help
Different components for different types of devices
Hello. If I want the component to be rendered only cliend-side, I add a suffix .client. Is it possible to come up with something similar depending on the type of device? P.S. Now I'm using @nuxtjs/device to detect the device.
import {LayoutHeaderDesktop, LayoutHeaderMobile} from "#components";
const { isDesktop } = useDevice();
const componentName = computed(()=> {
return isDesktop ? LayoutHeaderDesktop : LayoutHeaderMobile;
})
import {LayoutHeaderDesktop, LayoutHeaderMobile} from "#components";
const { isDesktop } = useDevice();
const componentName = computed(()=> {
return isDesktop ? LayoutHeaderDesktop : LayoutHeaderMobile;
})
5 replies