diff --git a/.eslintrc.cjs b/.eslintrc.cjs
index 7be5a785..7d5e4573 100644
--- a/.eslintrc.cjs
+++ b/.eslintrc.cjs
@@ -5,6 +5,7 @@ module.exports = {
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
// 'plugin:@typescript-eslint/recommended-requiring-type-checking',
+ 'plugin:@typescript-eslint/strict',
'prettier'
],
plugins: ['svelte3', 'tailwindcss', '@typescript-eslint', 'es', 'vitest'],
@@ -19,7 +20,19 @@ module.exports = {
'package.json',
'tsconfig.json'
],
- overrides: [{ files: ['*.svelte'], processor: 'svelte3/svelte3' }],
+ overrides: [
+ { files: ['*.svelte'], processor: 'svelte3/svelte3' },
+ {
+ files: ['*.ts'],
+ extends: [
+ 'eslint:recommended',
+ 'plugin:@typescript-eslint/recommended',
+ 'plugin:@typescript-eslint/recommended-requiring-type-checking',
+ 'plugin:@typescript-eslint/strict',
+ 'prettier'
+ ]
+ }
+ ],
settings: {
'svelte3/typescript': () => require('typescript')
},
diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml
index 9341dba8..a150127f 100644
--- a/.github/workflows/stale.yml
+++ b/.github/workflows/stale.yml
@@ -8,7 +8,7 @@ jobs:
stale:
runs-on: ubuntu-latest
steps:
- - uses: actions/stale@v5
+ - uses: actions/stale@v6
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
exempt-issue-labels: 'retained'
diff --git a/.vscode/settings.json b/.vscode/settings.json
index ff638551..925342c8 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -1,6 +1,6 @@
{
"editor.formatOnSave": true,
- "cSpell.words": ["asyncable", "mindmap", "pako", "Serde", "serdes"],
+ "cSpell.words": ["asyncable", "KROKI", "mindmap", "pako", "Serde", "serdes", "tailwindcss"],
"vitest.commandLine": "yarn test:unit",
"vitest.enable": true,
"testing.autoRun.mode": "rerun",
diff --git a/cypress/e2e/util.ts b/cypress/e2e/util.ts
index 73fe6dd2..6aa17ce5 100644
--- a/cypress/e2e/util.ts
+++ b/cypress/e2e/util.ts
@@ -17,6 +17,7 @@ export const verifyFileSize = (
) => {
const fileName = `mermaid-${fileType}-2022-01-01-000000.${extension}`;
const filePath = `${downloadsFolder}/${fileName}`;
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-call
cy.verifyDownload(fileName);
cy.readFile(filePath, null, {
log: false
@@ -31,6 +32,7 @@ export const verifyFileSnapshot = (
) => {
const fileName = `mermaid-${fileType}-2022-01-01-000000.${extension}`;
const filePath = `${downloadsFolder}/${fileName}`;
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-call
cy.verifyDownload(fileName);
cy.readFile(filePath, null, {
log: false
diff --git a/package.json b/package.json
index 800a553e..bd521a7a 100644
--- a/package.json
+++ b/package.json
@@ -29,15 +29,15 @@
"@testing-library/svelte": "3.2.2",
"@types/pako": "2.0.0",
"@types/uuid": "8.3.4",
- "@typescript-eslint/eslint-plugin": "5.42.0",
- "@typescript-eslint/parser": "5.42.0",
- "@vitest/ui": "0.24.3",
+ "@typescript-eslint/eslint-plugin": "5.43.0",
+ "@typescript-eslint/parser": "5.43.0",
+ "@vitest/ui": "0.25.1",
"autoprefixer": "10.4.12",
"c8": "7.12.0",
"chai": "4.3.6",
"cssnano": "5.1.13",
"cy-verify-downloads": "0.1.11",
- "cypress": "10.11.0",
+ "cypress": "11.0.1",
"cypress-localstorage-commands": "2.2.1",
"eslint": "8.27.0",
"eslint-config-prettier": "8.5.0",
@@ -45,7 +45,7 @@
"eslint-plugin-es": "4.1.0",
"eslint-plugin-postcss-modules": "2.0.0",
"eslint-plugin-svelte3": "4.0.0",
- "eslint-plugin-tailwindcss": "3.6.2",
+ "eslint-plugin-tailwindcss": "3.7.0",
"eslint-plugin-vitest": "0.0.11",
"esserializer": "1.3.2",
"husky": "8.0.1",
@@ -56,25 +56,25 @@
"postcss-load-config": "4.0.1",
"prettier": "2.7.1",
"prettier-plugin-svelte": "2.8.0",
- "svelte": "3.52.0",
+ "svelte": "3.53.1",
"svelte-preprocess": "4.10.7",
"tailwindcss": "3.2.1",
"tslib": "2.4.0",
"typescript": "4.8.4",
"vite": "3.2.2",
- "vitest": "0.24.3"
+ "vitest": "0.25.1"
},
"dependencies": {
"@mermaid-js/mermaid-mindmap": "9.2.2",
"analytics": "0.8.1",
"analytics-plugin-plausible": "0.0.6",
- "daisyui": "2.38.1",
+ "daisyui": "2.40.1",
"js-base64": "3.7.2",
"mermaid": "9.2.2",
"moment": "2.29.4",
"monaco-editor": "0.34.1",
"monaco-mermaid": "1.0.6",
- "pako": "2.0.4",
+ "pako": "2.1.0",
"random-word-slugs": "0.1.6",
"svg-pan-zoom": "3.6.1",
"uuid": "9.0.0"
diff --git a/src/env.d.ts b/src/env.d.ts
index e3cf245e..8188f7aa 100644
--- a/src/env.d.ts
+++ b/src/env.d.ts
@@ -1,11 +1,11 @@
///
interface ImportMetaEnv {
- readonly MERMAID_RENDERER_URL: string;
- readonly MERMAID_KROKI_RENDERER_URL: string;
- readonly MERMAID_CDN_URL: string;
- readonly MERMAID_BASE_URL: string;
- readonly MERMAID_LOCAL: boolean;
+ readonly MERMAID_RENDERER_URL?: string;
+ readonly MERMAID_KROKI_RENDERER_URL?: string;
+ readonly MERMAID_CDN_URL?: string;
+ readonly MERMAID_BASE_URL?: string;
+ readonly MERMAID_LOCAL?: boolean;
// more env variables...
}
diff --git a/src/global.d.ts b/src/global.d.ts
index 81ca3d20..95ecd6a0 100644
--- a/src/global.d.ts
+++ b/src/global.d.ts
@@ -9,7 +9,8 @@ declare global {
namespace jest {
interface Matchers
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
- // @ts-ignore
+ // @ts-expect-error
+ // eslint-disable-next-line no-undef
extends TestingLibraryMatchers {}
}
}
diff --git a/src/lib/components/actions.svelte b/src/lib/components/Actions.svelte
similarity index 90%
rename from src/lib/components/actions.svelte
rename to src/lib/components/Actions.svelte
index ed2acfd3..166a58cd 100644
--- a/src/lib/components/actions.svelte
+++ b/src/lib/components/Actions.svelte
@@ -1,6 +1,6 @@
diff --git a/src/lib/components/history/history.svelte b/src/lib/components/History/History.svelte
similarity index 96%
rename from src/lib/components/history/history.svelte
rename to src/lib/components/History/History.svelte
index 37527bcc..3663b71d 100644
--- a/src/lib/components/history/history.svelte
+++ b/src/lib/components/History/History.svelte
@@ -1,5 +1,5 @@