diff --git a/docs/.vitepress/theme/components/rules/index.js b/docs/.vitepress/theme/components/rules/index.js index b6cd20cb..5fd70f0e 100644 --- a/docs/.vitepress/theme/components/rules/index.js +++ b/docs/.vitepress/theme/components/rules/index.js @@ -76,12 +76,12 @@ categories.sort((a, b) => a.categoryOrder > b.categoryOrder ? 1 : a.categoryOrder < b.categoryOrder - ? -1 - : a.title > b.title - ? 1 - : a.title < b.title - ? -1 - : 0, + ? -1 + : a.title > b.title + ? 1 + : a.title < b.title + ? -1 + : 0, ); export const DEFAULT_RULES_CONFIG = allRules.reduce((c, r) => { diff --git a/src/utils/yaml.ts b/src/utils/yaml.ts index fff18961..3fce1472 100644 --- a/src/utils/yaml.ts +++ b/src/utils/yaml.ts @@ -238,8 +238,8 @@ export function incIndent(indent: string, context: RuleContext): string { numOfIndent === 2 ? " " : numOfIndent === 4 - ? " " - : " ".repeat(numOfIndent); + ? " " + : " ".repeat(numOfIndent); return `${indent}${add}`; }