Skip to content

Commit b2fd5bb

Browse files
committed
chore: linting
1 parent fab7e9e commit b2fd5bb

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1-
export function getPathRobotConfigPolyfill() {
1+
import type { H3Event } from 'h3'
2+
3+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
4+
export function getPathRobotConfigPolyfill(e: H3Event, options: any) {
25
return { indexable: true, rule: 'index, follow' }
36
}

src/runtime/nitro/sitemap/builder/sitemap.ts

+7-4
Original file line numberDiff line numberDiff line change
@@ -125,17 +125,19 @@ export function resolveSitemapEntries(sitemap: SitemapDefinition, sources: Sitem
125125
_key: `${_sitemap || ''}${loc}`,
126126
_locale: l,
127127
loc,
128-
alternatives: [{code: 'x-default'}, ...autoI18n.locales].map((locale) => {
128+
alternatives: [{ code: 'x-default' }, ...autoI18n.locales].map((locale) => {
129129
const code = locale.code === 'x-default' ? autoI18n.defaultLocale : locale.code
130130
const isDefault = locale.code === 'x-default' || locale.code === autoI18n.defaultLocale
131131
let href = ''
132132
if (autoI18n.strategy === 'prefix') {
133133
href = joinURL('/', code, e._pathWithoutPrefix)
134-
} else if (['prefix_and_default', 'prefix_except_default'].includes(autoI18n.strategy)) {
134+
}
135+
else if (['prefix_and_default', 'prefix_except_default'].includes(autoI18n.strategy)) {
135136
if (isDefault) {
136137
// no prefix
137138
href = e._pathWithoutPrefix
138-
} else {
139+
}
140+
else {
139141
href = joinURL('/', code, e._pathWithoutPrefix)
140142
}
141143
}
@@ -153,7 +155,8 @@ export function resolveSitemapEntries(sitemap: SitemapDefinition, sources: Sitem
153155
_urls[e._index] = newEntry
154156
// avoid getting re-replaced
155157
e._index = undefined
156-
} else {
158+
}
159+
else {
157160
_urls.push(newEntry)
158161
}
159162
}

0 commit comments

Comments
 (0)