Skip to content

bump: nuxt to 3.15.4 #53

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

Merged
merged 8 commits into from
Mar 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions src/configs/droneCI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,12 @@ const droneCI: Config = {
scripts: [],
dependencies: [],
nuxtConfig: {},
files: [{
path: '.drone.yml',
content: DRONE_TEMPLATE
}],
files: [
{
path: '.drone.yml',
content: DRONE_TEMPLATE
}
],
}

export default droneCI
66 changes: 33 additions & 33 deletions src/configs/eslint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,13 @@ const ignores = [
export default antfu({
// .eslintignore is no longer supported in Flat config, use ignores instead
ignores,

// Stylistic formatting rules
stylistic: {
indent: 2,
quotes: 'single',
},

// TypeScript and Vue are auto-detected, you can also explicitly enable them
typescript: true,
vue: true,

// Disable jsonc and yaml support
jsonc: false,
yaml: false,

// Overwrite certain rules to your preference
rules: {
'no-console': ['error', {
allow: ['info', 'warn', 'trace', 'error', 'group', 'groupEnd'],
Expand All @@ -44,31 +35,40 @@ export default antfu({
`

const eslint: Config = {
scripts: [{
name: 'lint',
command: 'oxlint --deny-warnings -D correctness -D suspicious -D perf && eslint --max-warnings 0 .'
}, {
name: 'lint:fix',
command: 'eslint . --fix',
}],
dependencies: [{
name: 'eslint',
version: '^8.57.0',
isDev: true
}, {
name: '@antfu/eslint-config',
version: '^2.26.0',
isDev: true
}, {
name: 'oxlint',
version: '^0.7.2',
isDev: true
}],
scripts: [
{
name: 'lint',
command: 'oxlint --deny-warnings -D correctness -D suspicious -D perf && eslint --max-warnings 0 .'
},
{
name: 'lint:fix',
command: 'eslint . --fix',
}
],
dependencies: [
{
name: 'eslint',
version: '^9.18.0',
isDev: true
},
{
name: '@antfu/eslint-config',
version: '^3.15.0',
isDev: true
},
{
name: 'oxlint',
version: '^0.15.7',
isDev: true
}
],
nuxtConfig: {},
files: [{
path: 'eslint.config.js',
content: eslintConfig
}],
files: [
{
path: 'eslint.config.js',
content: eslintConfig
}
],
}

export default eslint
10 changes: 6 additions & 4 deletions src/configs/github-actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,12 @@ const githubActions: Config = {
scripts: [],
dependencies: [],
nuxtConfig: {},
files: [{
path: '.github/workflows/ci.yaml',
content: GITHUB_ACTIONS_TEMPLATE
}],
files: [
{
path: '.github/workflows/ci.yaml',
content: GITHUB_ACTIONS_TEMPLATE
}
],
}

export default githubActions
45 changes: 26 additions & 19 deletions src/configs/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,37 +47,44 @@ const i18n: ModuleConfig = {
humanReadableName: 'i18n',
description: 'I18n (Internationalization) module for your Nuxt project powered by Vue I18n. See more: https://i18n.nuxtjs.org/',
scripts: [],
dependencies: [{
name: '@nuxtjs/i18n',
version: '^8.4.0',
isDev: true
}],
dependencies: [
{
name: '@nuxtjs/i18n',
version: '^9.2.1',
isDev: true
}
],
nuxtConfig: {
modules: ['@nuxtjs/i18n'],
// @ts-expect-error i18n is not set in default Nuxt Config, as the package is not installed
i18n: {
strategy: 'prefix_except_default',
lazy: true,
langDir: 'locales',
defaultLocale: 'en',
locales: [
{ name: 'English', code: 'en', file: 'en.json' },
],
strategy: 'prefix_except_default',
detectBrowserLanguage: false,
lazy: true,
experimental: {
localeDetector: './localeDetector.ts'
autoImportTranslationFunctions: true,
localeDetector: 'localeDetector.ts'
}
}
},
files: [{
path: 'localeDetector.ts',
content: localeDetector
}, {
path: 'locales/en.json',
content: englishLocaleFile
}, {
path: 'components/Welcome/I18nDemo.vue',
content: i18nDemoComponent
}],
files: [
{
path: 'i18n/localeDetector.ts',
content: localeDetector
},
{
path: 'i18n/locales/en.json',
content: englishLocaleFile
},
{
path: 'components/Welcome/I18nDemo.vue',
content: i18nDemoComponent
}
],
tasksPostInstall: [],
indexVue: generateModuleHTMLSnippet('WelcomeI18nDemo'),
}
Expand Down
39 changes: 20 additions & 19 deletions src/configs/naiveui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,36 +28,37 @@ const showModal = ref(false)
`

const nuxtAppVueWithNaiveConfig = `<template>
<naive-config>
<NaiveConfig>
<NuxtRouteAnnouncer />
<NuxtPage />
</naive-config>
</NaiveConfig>
</template>
`

const naiveui: ModuleConfig = {
humanReadableName: 'Naive UI',
description: 'A Vue 3 Component Library. Complete, Customizable, Uses TypeScript, Fast. See more: https://www.naiveui.com/',
scripts: [],
dependencies: [{
name: '@bg-dev/nuxt-naiveui',
/*
* Pinned to v1.0.0-edge.2 as naiveui was failing on typecheck.
* replace this with the offical release, once it is out.
* See: https://github.com/becem-gharbi/nuxt-naiveui/issues/76
*/
version: '1.0.0-edge.2',
isDev: true
}],
dependencies: [
{
name: '@bg-dev/nuxt-naiveui',
version: '2.0.0-rc.4',
isDev: true
}
],
nuxtConfig: {
modules: ['@bg-dev/nuxt-naiveui'],
},
files: [{
path: 'components/Welcome/NaiveDemo.vue',
content: naiveDemoComponent
}, {
path: 'app.vue',
content: nuxtAppVueWithNaiveConfig
}],
files: [
{
path: 'components/Welcome/NaiveDemo.vue',
content: naiveDemoComponent
},
{
path: 'app.vue',
content: nuxtAppVueWithNaiveConfig
}
],
tasksPostInstall: [],
indexVue: generateModuleHTMLSnippet('WelcomeNaiveDemo'),
}
Expand Down
13 changes: 7 additions & 6 deletions src/configs/pnpm.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
import type { Config } from '../types'

// nuxt 3 + pnpm needs to shamefully hoist + we want to auto-install required peer dependencies (last one taken from: https://github.com/antfu/vitesse/blob/main/.npmrc)
const npmrc = `
shamefully-hoist=true
const npmrc = `shamefully-hoist=true
strict-peer-dependencies=false
`

const pnpm: Config = {
dependencies: [],
scripts: [],
nuxtConfig: {},
files: [{
path: '.npmrc',
content: npmrc
}],
files: [
{
path: '.npmrc',
content: npmrc
}
],
}

export default pnpm
Loading