mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 05:35:13 +00:00
chore: lint
This commit is contained in:
parent
e63e34f9ab
commit
eaa0ebee6c
@ -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)
|
||||||
|
@ -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'])
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
@ -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
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -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: {
|
||||||
|
@ -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>)
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -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'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user