mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-18 14:59:53 +02:00
build(types): use prettier conf on config.types.ts
Currently, the `packages/mermaid/src/config.type.ts` types file (auto-generated via `pnpm run --filter mermaid types:build-config`) uses the default prettier config. Instead, we should use the prettier config in the Mermaid repo, as it's slightly different from the default prettier config.
This commit is contained in:
@@ -18,6 +18,7 @@ import { promisify } from 'node:util';
|
||||
|
||||
import { load, JSON_SCHEMA } from 'js-yaml';
|
||||
import { compile, type JSONSchema } from 'json-schema-to-typescript';
|
||||
import prettier from 'prettier';
|
||||
|
||||
import _Ajv2019, { type JSONSchemaType } from 'ajv/dist/2019.js';
|
||||
|
||||
@@ -207,6 +208,7 @@ async function generateTypescript(mermaidConfigSchema: JSONSchemaType<MermaidCon
|
||||
{
|
||||
additionalProperties: false, // in JSON Schema 2019-09, these are called `unevaluatedProperties`
|
||||
unreachableDefinitions: true, // definition for FontConfig is unreachable
|
||||
style: (await prettier.resolveConfig('.')) ?? {},
|
||||
}
|
||||
);
|
||||
|
||||
|
Reference in New Issue
Block a user