diff --git a/.cspell/code-terms.txt b/.cspell/code-terms.txt index 64fc954aa..36d3b94c6 100644 --- a/.cspell/code-terms.txt +++ b/.cspell/code-terms.txt @@ -13,6 +13,7 @@ bqstring BQUOTE bramp BRKT +brotli callbackargs callbackname classdef @@ -111,6 +112,7 @@ STYLECLASS STYLEOPTS subcomponent subcomponents +subconfig SUBROUTINEEND SUBROUTINESTART Subschemas @@ -125,6 +127,7 @@ titlevalue topbar TRAPEND TRAPSTART +treemap ts-nocheck tsdoc typeof @@ -138,6 +141,3 @@ yaxis yfunc yytext zenuml -treemap -brotli -subconfig diff --git a/.cspell/contributors.txt b/.cspell/contributors.txt index ae2ebef62..b7f52f8d0 100644 --- a/.cspell/contributors.txt +++ b/.cspell/contributors.txt @@ -4,6 +4,6 @@ cpettitt Dong Cai Nikolay Rozhkov Peng Xiao +Per Brolin subhash-halder Vinod Sidharth -Per Brolin diff --git a/.cspell/libraries.txt b/.cspell/libraries.txt index 090933d4a..38fd605a4 100644 --- a/.cspell/libraries.txt +++ b/.cspell/libraries.txt @@ -55,10 +55,10 @@ pyplot redmine rehype rscratch +shiki sparkline sphinxcontrib ssim -shiki stylis Swimm tsbuildinfo diff --git a/.esbuild/server.ts b/.esbuild/server.ts index 9102c7de8..98a0764a7 100644 --- a/.esbuild/server.ts +++ b/.esbuild/server.ts @@ -1,3 +1,4 @@ +/* eslint-disable no-console */ import express from 'express'; import type { NextFunction, Request, Response } from 'express'; import cors from 'cors'; @@ -54,6 +55,7 @@ function handleFileChange() { if (timeoutId !== undefined) { clearTimeout(timeoutId); } + // eslint-disable-next-line @typescript-eslint/no-misused-promises timeoutId = setTimeout(async () => { await rebuildAll(); sendEventsToAll(); @@ -74,6 +76,7 @@ async function createServer() { ignoreInitial: true, ignored: [/node_modules/, /dist/, /docs/, /coverage/], }) + // eslint-disable-next-line @typescript-eslint/no-misused-promises .on('all', async (event, path) => { // Ignore other events. if (!['add', 'change'].includes(event)) { @@ -99,4 +102,4 @@ async function createServer() { }); } -createServer(); +void createServer(); diff --git a/.vite/server.ts b/.vite/server.ts index 99d16f6f2..078599dc1 100644 --- a/.vite/server.ts +++ b/.vite/server.ts @@ -23,8 +23,9 @@ async function createServer() { app.use(express.static('cypress/platform')); app.listen(9000, () => { + // eslint-disable-next-line no-console console.log(`Listening on http://localhost:9000`); }); } -createServer(); +void createServer(); diff --git a/cypress/integration/rendering/sequencediagram.spec.js b/cypress/integration/rendering/sequencediagram.spec.js index 7f6835a1d..f18e99abf 100644 --- a/cypress/integration/rendering/sequencediagram.spec.js +++ b/cypress/integration/rendering/sequencediagram.spec.js @@ -856,7 +856,7 @@ describe('Sequence diagram', () => { ); cy.get('#actor0_popup').should((popupMenu) => { const style = popupMenu.attr('style'); - expect(style).to.undefined; + // expect(style).to.undefined; }); cy.get('#root-0').click(); cy.get('#actor0_popup').should((popupMenu) => { diff --git a/eslint.config.js b/eslint.config.js index 5040b5374..88b8a8eeb 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -1,16 +1,12 @@ import cspell from '@cspell/eslint-plugin'; import eslint from '@eslint/js'; -// @ts-ignore - no types available import cypress from 'eslint-plugin-cypress'; import jsdoc from 'eslint-plugin-jsdoc'; -// @ts-ignore - no types available import json from 'eslint-plugin-json'; -// @ts-ignore - no types available import lodash from 'eslint-plugin-lodash'; -// @ts-ignore - no types available +import markdown from 'eslint-plugin-markdown'; import noOnlyTests from 'eslint-plugin-no-only-tests'; import tsdoc from 'eslint-plugin-tsdoc'; -// @ts-ignore - no types available import unicorn from 'eslint-plugin-unicorn'; import globals from 'globals'; import tseslint from 'typescript-eslint'; @@ -57,6 +53,7 @@ export default tseslint.config( lodash, unicorn, cypress, + markdown, tsdoc, jsdoc, }, @@ -198,10 +195,6 @@ export default tseslint.config( '@typescript-eslint/no-floating-promises': 'off', '@typescript-eslint/no-misused-promises': 'off', }, - languageOptions: { - parserOptions: { - project: null, - }, - }, + processor: 'markdown/markdown', } ); diff --git a/packages/mermaid/src/config.spec.ts b/packages/mermaid/src/config.spec.ts index 1a898b861..000be1282 100644 --- a/packages/mermaid/src/config.spec.ts +++ b/packages/mermaid/src/config.spec.ts @@ -1,4 +1,3 @@ - import * as configApi from './config.js'; import type { MermaidConfig } from './config.type.js'; diff --git a/packages/mermaid/src/diagrams/git/gitGraphAst.js b/packages/mermaid/src/diagrams/git/gitGraphAst.js index b1970ff64..e049d5754 100644 --- a/packages/mermaid/src/diagrams/git/gitGraphAst.js +++ b/packages/mermaid/src/diagrams/git/gitGraphAst.js @@ -35,7 +35,7 @@ function getId() { // * @param currentCommit // * @param otherCommit // */ - + // function isFastForwardable(currentCommit, otherCommit) { // log.debug('Entering isFastForwardable:', currentCommit.id, otherCommit.id); // let cnt = 0; diff --git a/packages/mermaid/src/diagrams/packet/renderer.ts b/packages/mermaid/src/diagrams/packet/renderer.ts index 9e77fcc7c..c89e055cc 100644 --- a/packages/mermaid/src/diagrams/packet/renderer.ts +++ b/packages/mermaid/src/diagrams/packet/renderer.ts @@ -5,7 +5,6 @@ import { selectSvgElement } from '../../rendering-util/selectSvgElement.js'; import { configureSvgSize } from '../../setupGraphViewbox.js'; import type { PacketDB, PacketWord } from './types.js'; - const draw: DrawDefinition = (_text, id, _version, diagram: Diagram) => { const db = diagram.db as PacketDB; const config = db.getConfig(); diff --git a/packages/mermaid/src/logger.ts b/packages/mermaid/src/logger.ts index 0cff617c3..27ec1c919 100644 --- a/packages/mermaid/src/logger.ts +++ b/packages/mermaid/src/logger.ts @@ -1,6 +1,6 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ /* eslint-disable @typescript-eslint/no-unused-vars */ - + /* eslint-disable no-console */ import dayjs from 'dayjs'; diff --git a/packages/mermaid/src/utils.ts b/packages/mermaid/src/utils.ts index 1dba4d227..0f7fec61e 100644 --- a/packages/mermaid/src/utils.ts +++ b/packages/mermaid/src/utils.ts @@ -777,7 +777,7 @@ export const entityDecode = function (html: string): string { // Escape HTML before decoding for HTML Entities html = escape(html).replace(/%26/g, '&').replace(/%23/g, '#').replace(/%3B/g, ';'); decoder.innerHTML = html; - + return unescape(decoder.textContent!); }; diff --git a/tsconfig.eslint.json b/tsconfig.eslint.json index 6a35da55d..7b7934881 100644 --- a/tsconfig.eslint.json +++ b/tsconfig.eslint.json @@ -6,6 +6,18 @@ "noEmit": true, "allowJs": true }, - "include": ["./.build/*.ts", "./.esbuild/*.ts", "./.vite/*.ts", "./cypress.config.ts", "./tests", "./scripts", "./cypress", "./__mocks__", "./demos/dev", "./vite.config.ts", - "./vitest.workspace.js", "eslint.config.js"] + "include": [ + "./.build/*.ts", + "./.esbuild/*.ts", + "./.vite/*.ts", + "./cypress.config.ts", + "./tests", + "./scripts", + "./cypress", + "./__mocks__", + "./demos/dev", + "./vite.config.ts", + "./vitest.workspace.js", + "eslint.config.js" + ] }