chore: lint

This commit is contained in:
Daniel Roe 2024-07-03 22:28:23 +01:00
parent e63e34f9ab
commit eaa0ebee6c
No known key found for this signature in database
GPG Key ID: CBC814C393D93268
7 changed files with 16 additions and 16 deletions

View File

@ -88,7 +88,7 @@ export async function initNitro (nuxt: Nuxt & { _nitro?: Nitro }) {
esbuild: { esbuild: {
options: { options: {
exclude: excludePattern, exclude: excludePattern,
...nuxt.options.esbuild.options ...nuxt.options.esbuild.options,
}, },
}, },
analyze: !nuxt.options.test && nuxt.options.build.analyze && (nuxt.options.build.analyze === true || nuxt.options.build.analyze.enabled) analyze: !nuxt.options.test && nuxt.options.build.analyze && (nuxt.options.build.analyze === true || nuxt.options.build.analyze.enabled)

View File

@ -11,11 +11,11 @@ export default defineUntypedSchema({
$resolve: async (val: TransformOptions['tsconfigRaw'], get) => { $resolve: async (val: TransformOptions['tsconfigRaw'], get) => {
return defu(val, { return defu(val, {
compilerOptions: { compilerOptions: {
experimentalDecorators: await get('experimental.decorators') as boolean experimentalDecorators: await get('experimental.decorators') as boolean,
} },
} satisfies TransformOptions['tsconfigRaw']) } satisfies TransformOptions['tsconfigRaw'])
} },
} },
} },
}, },
}) })

View File

@ -78,15 +78,15 @@ export default defineUntypedSchema({
*/ */
tsConfig: { tsConfig: {
$resolve: async (val, get) => { $resolve: async (val, get) => {
if (val) return val if (val) { return val }
const enableDecorators = await get('experimental.decorators') const enableDecorators = await get('experimental.decorators')
if (!enableDecorators) return {} if (!enableDecorators) { return {} }
return { return {
compilerOptions: { compilerOptions: {
experimentalDecorators: true experimentalDecorators: true,
} },
} satisfies TSConfig } satisfies TSConfig
}, },
}, },

View File

@ -85,7 +85,7 @@ export default defineUntypedSchema({
esbuild: { esbuild: {
$resolve: async (val: Record<string, any>, get) => { $resolve: async (val: Record<string, any>, get) => {
return defu(val, await get('esbuild.options') as Record<string, any>) return defu(val, await get('esbuild.options') as Record<string, any>)
} },
}, },
clearScreen: true, clearScreen: true,
build: { build: {

View File

@ -160,7 +160,7 @@ export default defineUntypedSchema({
esbuild: { esbuild: {
$resolve: async (val: Record<string, any>, get) => { $resolve: async (val: Record<string, any>, get) => {
return defu(val, await get('esbuild.options') as Record<string, any>) return defu(val, await get('esbuild.options') as Record<string, any>)
} },
}, },
/** /**

View File

@ -1,11 +1,11 @@
<script setup lang="ts"> <script setup lang="ts">
function something(_method: () => unknown) { function something (_method: () => unknown) {
return () => 'decorated' return () => 'decorated'
} }
class SomeClass { class SomeClass {
@something @something
public someMethod() { public someMethod () {
return 'initial' return 'initial'
} }
} }

View File

@ -1,11 +1,11 @@
export default eventHandler((_event) => { export default eventHandler((_event) => {
function something(_method: () => unknown) { function something (_method: () => unknown) {
return () => 'decorated' return () => 'decorated'
} }
class SomeClass { class SomeClass {
@something @something
public someMethod() { public someMethod () {
return 'initial' return 'initial'
} }
} }