Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Commit 15786f4

Browse files
committed
style: lint
1 parent 842a724 commit 15786f4

File tree

4 files changed

+8
-9
lines changed

4 files changed

+8
-9
lines changed

src/runtime/composables/meta.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ type MetaInfoMapper<T> = {
3232

3333
export function createEmptyMeta(): MetaInfoMapper<Required<MetaInfo>> {
3434
return {
35-
titleTemplate: (null as unknown) as undefined,
35+
titleTemplate: null as unknown as undefined,
3636

3737
__dangerouslyDisableSanitizers: [],
3838
__dangerouslyDisableSanitizersByTagID: {},

src/vite-plugin.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ export function compositionApiPlugin(): Plugin & { enforce: 'pre' } {
2121
/@nuxtjs[\\/]composition-api(?![\\/])/g,
2222
'~composition-api'
2323
)
24-
const keyedFunctions = /(useStatic|shallowSsrRef|ssrPromise|ssrRef|reqSsrRef|useAsync)/
24+
const keyedFunctions =
25+
/(useStatic|shallowSsrRef|ssrPromise|ssrRef|reqSsrRef|useAsync)/
2526
if (!keyedFunctions.test(code)) {
2627
return {
2728
code,
@@ -37,7 +38,7 @@ export function compositionApiPlugin(): Plugin & { enforce: 'pre' } {
3738

3839
walk(ast, {
3940
enter(node) {
40-
const { end } = (node as unknown) as {
41+
const { end } = node as unknown as {
4142
end: number
4243
}
4344
const { callee, arguments: args = [] } = node as {

test/fixture/pages/index.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,8 @@ export default defineComponent({
7878
7979
const ttfb = ref(-1)
8080
onMounted(() => {
81-
ttfb.value = globalThis.performance.getEntriesByType(
82-
'navigation'
83-
)[0].responseStart
81+
ttfb.value =
82+
globalThis.performance.getEntriesByType('navigation')[0].responseStart
8483
})
8584
8685
return {

test/fixture/pages/ttfb.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,8 @@ export default defineComponent({
1616
1717
const ttfb = ref(-1)
1818
onMounted(() => {
19-
ttfb.value = globalThis.performance.getEntriesByType(
20-
'navigation'
21-
)[0].responseStart
19+
ttfb.value =
20+
globalThis.performance.getEntriesByType('navigation')[0].responseStart
2221
})
2322
2423
return {

0 commit comments

Comments
 (0)