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