diff --git a/.eslintrc.cjs b/.eslintrc.cjs index e4044de30..3badc3ca3 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -7,7 +7,6 @@ module.exports = { }, plugins: [ "import", - "simple-import-sort", "@typescript-eslint", "@typescript-eslint/eslint-plugin", ], @@ -20,8 +19,6 @@ module.exports = { "no-unused-vars": ["warn", { argsIgnorePattern: "^_" }], "import/newline-after-import": "warn", "import/no-useless-path-segments": "warn", - "simple-import-sort/imports": "warn", - "simple-import-sort/exports": "warn", "prefer-const": "warn", "no-nested-ternary": "warn", "curly": "error", diff --git a/package.json b/package.json index a90d87e63..521f5bc54 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,7 @@ }, "devDependencies": { "@bufbuild/protoc-gen-es": "^1.8.0", + "@poppanator/sveltekit-svg": "^4.2.1", "@sqltools/formatter": "^1.2.2", "@sveltejs/adapter-static": "^3.0.0", "@sveltejs/kit": "^2.4.1", @@ -42,7 +43,6 @@ "eslint": "^8.44.0", "eslint-plugin-compat": "^4.1.4", "eslint-plugin-import": "^2.25.4", - "eslint-plugin-simple-import-sort": "^10.0.0", "eslint-plugin-svelte": "^2", "license-checker-rseidelsohn": "^4.2.6", "prettier": "^2.4.1", @@ -51,6 +51,7 @@ "svelte-check": "^3.4.4", "svelte-preprocess": "^5.0.4", "svelte-preprocess-esbuild": "^3.0.1", + "svgo": "^3.2.0", "tslib": "^2.0.3", "tsx": "^3.12.0", "typescript": "^5.0.4", @@ -69,13 +70,13 @@ "codemirror": "^5.63.1", "d3": "^7.0.0", "fabric": "^5.3.0", + "hammerjs": "^2.0.8", "intl-pluralrules": "^2.0.0", "jquery": "^3.5.1", "jquery-ui-dist": "^1.12.1", "lodash-es": "^4.17.21", "marked": "^5.1.0", - "mathjax": "^3.1.2", - "hammerjs": "^2.0.8" + "mathjax": "^3.1.2" }, "resolutions": { "canvas": "npm:empty-npm-package" diff --git a/ts/editable/icons.ts b/ts/editable/icons.ts deleted file mode 100644 index 034aee1bd..000000000 --- a/ts/editable/icons.ts +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright: Ankitects Pty Ltd and contributors -// License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html - -export { default as mathIcon } from "@mdi/svg/svg/math-integral-box.svg"; diff --git a/ts/editable/mathjax.ts b/ts/editable/mathjax.ts index 55e23498d..94ea32118 100644 --- a/ts/editable/mathjax.ts +++ b/ts/editable/mathjax.ts @@ -7,7 +7,7 @@ import "mathjax/es5/tex-svg-full"; -import { mathIcon } from "./icons"; +import mathIcon from "@mdi/svg/svg/math-integral-box.svg?src"; const parser = new DOMParser(); diff --git a/ts/editor/ClozeButtons.svelte b/ts/editor/ClozeButtons.svelte index fdb29c320..11b8ca933 100644 --- a/ts/editor/ClozeButtons.svelte +++ b/ts/editor/ClozeButtons.svelte @@ -10,10 +10,11 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html import { get } from "svelte/store"; import ButtonGroup from "$lib/components/ButtonGroup.svelte"; + import Icon from "$lib/components/Icon.svelte"; import IconButton from "$lib/components/IconButton.svelte"; + import { clozeIcon, incrementClozeIcon } from "$lib/components/icons"; import Shortcut from "$lib/components/Shortcut.svelte"; - import { clozeIcon, incrementClozeIcon } from "./icons"; import { context as noteEditorContext } from "./NoteEditor.svelte"; import { editingInputIsRichText } from "./rich-text-input"; @@ -84,7 +85,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html on:click={onIncrementCloze} --border-left-radius="5px" > - {@html incrementClozeIcon} + - {@html clozeIcon} + diff --git a/ts/editor/CollapseBadge.svelte b/ts/editor/CollapseBadge.svelte index 8ea80eae2..f2b434afc 100644 --- a/ts/editor/CollapseBadge.svelte +++ b/ts/editor/CollapseBadge.svelte @@ -4,14 +4,14 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html -->
- {@html chevronDown} +
diff --git a/ts/routes/deck-options/SaveButton.svelte b/ts/routes/deck-options/SaveButton.svelte index dc5e4ab06..1c3c2bd63 100644 --- a/ts/routes/deck-options/SaveButton.svelte +++ b/ts/routes/deck-options/SaveButton.svelte @@ -12,6 +12,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html import DropdownDivider from "$lib/components/DropdownDivider.svelte"; import DropdownItem from "$lib/components/DropdownItem.svelte"; + import Icon from "$lib/components/Icon.svelte"; import IconButton from "$lib/components/IconButton.svelte"; import { chevronDown } from "$lib/components/icons"; import LabelButton from "$lib/components/LabelButton.svelte"; @@ -102,7 +103,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html --border-left-radius={rtl ? "var(--border-radius)" : "0"} iconSize={80} > - {@html chevronDown} + dispatch("add")}> diff --git a/ts/routes/image-occlusion/Toast.svelte b/ts/routes/image-occlusion/Toast.svelte index 37c50aa0a..17a26f558 100644 --- a/ts/routes/image-occlusion/Toast.svelte +++ b/ts/routes/image-occlusion/Toast.svelte @@ -3,9 +3,9 @@ Copyright: Ankitects Pty Ltd and contributors License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html -->