chore: Resolve eslint errors

This commit is contained in:
Sidharth Vinod
2024-06-29 16:20:46 +05:30
parent 4a50feb5d9
commit 4c6e2783b0
13 changed files with 32 additions and 25 deletions

View File

@@ -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

View File

@@ -4,6 +4,6 @@ cpettitt
Dong Cai
Nikolay Rozhkov
Peng Xiao
Per Brolin
subhash-halder
Vinod Sidharth
Per Brolin

View File

@@ -55,10 +55,10 @@ pyplot
redmine
rehype
rscratch
shiki
sparkline
sphinxcontrib
ssim
shiki
stylis
Swimm
tsbuildinfo

View File

@@ -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();

View File

@@ -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();

View File

@@ -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) => {

View File

@@ -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',
}
);

View File

@@ -1,4 +1,3 @@
import * as configApi from './config.js';
import type { MermaidConfig } from './config.type.js';

View File

@@ -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();

View File

@@ -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"
]
}