diff --git a/packages/mermaid/scripts/create-types-from-json-schema.mts b/packages/mermaid/scripts/create-types-from-json-schema.mts index 57b066812..80cd2120d 100644 --- a/packages/mermaid/scripts/create-types-from-json-schema.mts +++ b/packages/mermaid/scripts/create-types-from-json-schema.mts @@ -18,7 +18,7 @@ import { execFile } from 'node:child_process'; import { readFile, writeFile } from 'node:fs/promises'; import { join } from 'node:path'; import { promisify } from 'node:util'; -import prettier from 'prettier'; +import { prettierConfig } from './prettier.js'; // Workaround for wrong AJV types, see // https://github.com/ajv-validator/ajv/issues/2132#issuecomment-1290409907 @@ -141,7 +141,7 @@ async function generateTypescript(mermaidConfigSchema: JSONSchemaType/g; const includedFiles: Set = new Set(); diff --git a/packages/mermaid/scripts/prettier.ts b/packages/mermaid/scripts/prettier.ts new file mode 100644 index 000000000..72177808e --- /dev/null +++ b/packages/mermaid/scripts/prettier.ts @@ -0,0 +1,8 @@ +export const prettierConfig = { + endOfLine: 'auto', + printWidth: 100, + singleQuote: true, + useTabs: false, + tabWidth: 2, + trailingComma: 'es5', +} as const; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8cbe4be80..cf8334666 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -303,12 +303,6 @@ importers: '@types/uuid': specifier: ^9.0.8 version: 9.0.8 - '@typescript-eslint/eslint-plugin': - specifier: ^7.3.1 - version: 7.6.0(@typescript-eslint/parser@7.6.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5) - '@typescript-eslint/parser': - specifier: ^7.3.1 - version: 7.6.0(eslint@8.57.0)(typescript@5.4.5) ajv: specifier: ^8.12.0 version: 8.12.0