feat(anatomy): curation pipeline — changeset schema, applier with before/after records, cleaned single asset, draft seed, changelog + review report generators; seed layout legacy-import/curation/draft
This commit is contained in:
1 parent
3dbbfdf1df
commit
6870d87910
58 files changed
+18167
-267
No files matched your search
@@ -0,0 +1,30 @@
|
||||
import { format } from 'prettier'
|
||||
|
||||
/**
|
||||
* Prettier formatting of the generated artifacts with the repository
|
||||
* options, so `prettier --check` accepts the committed files as generated
|
||||
* (no exclusion needed). Shared by the legacy import and the draft.
|
||||
*/
|
||||
|
||||
const PRETTIER_OPTIONS = {
|
||||
semi: false,
|
||||
singleQuote: true,
|
||||
tabWidth: 2,
|
||||
useTabs: false,
|
||||
trailingComma: 'all',
|
||||
printWidth: 80,
|
||||
bracketSpacing: true,
|
||||
arrowParens: 'always',
|
||||
endOfLine: 'lf',
|
||||
} as const
|
||||
|
||||
export function formatJson(value: unknown): Promise<string> {
|
||||
return format(JSON.stringify(value, null, 2), {
|
||||
...PRETTIER_OPTIONS,
|
||||
parser: 'json',
|
||||
})
|
||||
}
|
||||
|
||||
export function formatMarkdown(text: string): Promise<string> {
|
||||
return format(text, { ...PRETTIER_OPTIONS, parser: 'markdown' })
|
||||
}
|
||||
Reference in new issue
Block a user