diff --git a/.esbuild/build.ts b/.esbuild/build.ts index 310c92c7d..2735f1f91 100644 --- a/.esbuild/build.ts +++ b/.esbuild/build.ts @@ -56,7 +56,9 @@ const handler = (e) => { const main = async () => { await generateLangium(); - await mkdir('stats').catch(() => {}); + await mkdir('stats').catch(() => { + // Ignore error if directory already exists + }); const packageNames = Object.keys(packageOptions) as (keyof typeof packageOptions)[]; // it should build `parser` before `mermaid` because it's a dependency for (const pkg of packageNames) { diff --git a/eslint.config.js b/eslint.config.js index b635c8731..d31685c05 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -69,15 +69,6 @@ export default tseslint.config( '@typescript-eslint/no-floating-promises': 'error', '@typescript-eslint/no-misused-promises': 'error', '@typescript-eslint/no-unused-vars': 'warn', - '@typescript-eslint/no-unsafe-argument': 'off', - '@typescript-eslint/no-unsafe-member-access': 'off', - '@typescript-eslint/no-unsafe-call': 'off', - '@typescript-eslint/no-unsafe-return': 'off', - '@typescript-eslint/no-empty-function': 'off', - '@typescript-eslint/prefer-nullish-coalescing': 'warn', - '@typescript-eslint/prefer-promise-reject-errors': 'off', - '@typescript-eslint/only-throw-error': 'off', - '@typescript-eslint/no-unsafe-assignment': 'off', '@typescript-eslint/consistent-type-definitions': 'error', '@typescript-eslint/ban-ts-comment': [ 'error', @@ -100,6 +91,16 @@ export default tseslint.config( }, }, ], + // START: These rules should be turned on once the codebase is cleaned up + '@typescript-eslint/no-unsafe-argument': 'off', + '@typescript-eslint/no-unsafe-assignment': 'off', + '@typescript-eslint/no-unsafe-call': 'off', + '@typescript-eslint/no-unsafe-member-access': 'off', + '@typescript-eslint/no-unsafe-return': 'off', + '@typescript-eslint/only-throw-error': 'warn', + '@typescript-eslint/prefer-nullish-coalescing': 'warn', + '@typescript-eslint/prefer-promise-reject-errors': 'warn', + // END 'json/*': ['error', 'allowComments'], '@cspell/spellchecker': [ 'error', diff --git a/packages/mermaid/src/logger.ts b/packages/mermaid/src/logger.ts index d73b05397..18edb43de 100644 --- a/packages/mermaid/src/logger.ts +++ b/packages/mermaid/src/logger.ts @@ -1,3 +1,4 @@ +/* eslint-disable @typescript-eslint/no-empty-function */ /* eslint-disable @typescript-eslint/no-explicit-any */ /* eslint-disable @typescript-eslint/no-unused-vars */