[ci] format
This commit is contained in:
parent
facfc4682f
commit
9532d56b50
3 changed files with 37 additions and 32 deletions
|
@ -1,4 +1,4 @@
|
||||||
import type { SitemapOptions, SitemapItem } from './index';
|
import type { SitemapItem, SitemapOptions } from './index';
|
||||||
import { parseUrl } from './utils/parse-url';
|
import { parseUrl } from './utils/parse-url';
|
||||||
|
|
||||||
const STATUS_CODE_PAGE_REGEXP = /\/[0-9]{3}\/?$/;
|
const STATUS_CODE_PAGE_REGEXP = /\/[0-9]{3}\/?$/;
|
||||||
|
|
|
@ -1,5 +1,10 @@
|
||||||
import type { AstroConfig, AstroIntegration } from 'astro';
|
import type { AstroConfig, AstroIntegration } from 'astro';
|
||||||
import { LinkItem as LinkItemBase, simpleSitemapAndIndex, SitemapItemLoose, EnumChangefreq } from 'sitemap';
|
import {
|
||||||
|
EnumChangefreq,
|
||||||
|
LinkItem as LinkItemBase,
|
||||||
|
simpleSitemapAndIndex,
|
||||||
|
SitemapItemLoose,
|
||||||
|
} from 'sitemap';
|
||||||
import { fileURLToPath } from 'url';
|
import { fileURLToPath } from 'url';
|
||||||
import { ZodError } from 'zod';
|
import { ZodError } from 'zod';
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { z } from 'zod';
|
|
||||||
import { EnumChangefreq as ChangeFreq } from 'sitemap';
|
import { EnumChangefreq as ChangeFreq } from 'sitemap';
|
||||||
|
import { z } from 'zod';
|
||||||
import { SITEMAP_CONFIG_DEFAULTS } from './config-defaults';
|
import { SITEMAP_CONFIG_DEFAULTS } from './config-defaults';
|
||||||
|
|
||||||
const localeKeySchema = z.string().min(1);
|
const localeKeySchema = z.string().min(1);
|
||||||
|
@ -20,7 +20,7 @@ export const SitemapOptionsSchema = z
|
||||||
.min(2)
|
.min(2)
|
||||||
.regex(/^[a-zA-Z\-]+$/gm, {
|
.regex(/^[a-zA-Z\-]+$/gm, {
|
||||||
message: 'Only English alphabet symbols and hyphen allowed',
|
message: 'Only English alphabet symbols and hyphen allowed',
|
||||||
}),
|
})
|
||||||
),
|
),
|
||||||
})
|
})
|
||||||
.refine((val) => !val || val.locales[val.defaultLocale], {
|
.refine((val) => !val || val.locales[val.defaultLocale], {
|
||||||
|
|
Loading…
Reference in a new issue