diff --git a/eslint.config.js b/eslint.config.js index 1bc9a06..fc3ae8c 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -4,6 +4,7 @@ import lichthagel from "@lichthagel/eslint-config"; /** @type {import("@lichthagel/eslint-config").FlatConfigItem[]} */ export default [ ...(await lichthagel({ + solid: true, typescript: true, })), { diff --git a/package.json b/package.json index 7e4183b..e6bbebd 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "@iconify/json": "^2.2.259", "@lichthagel/eslint-config": "github:Lichthagel/eslint-config", "eslint": "^9.12.0", - "eslint-plugin-n": "^17.11.1", + "eslint-plugin-solid": "^0.14.3", "solid-element": "^1.9.0", "solid-js": "^1.9.2", "typescript": "^5.6.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 79a8c70..3ed8bc1 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -13,13 +13,13 @@ importers: version: 2.2.259 '@lichthagel/eslint-config': specifier: github:Lichthagel/eslint-config - version: https://codeload.github.com/Lichthagel/eslint-config/tar.gz/759fe7cdca6baccf8d07bb0fee04e9caac25cb71(eslint-plugin-n@17.11.1(eslint@9.12.0))(eslint@9.12.0)(svelte@4.2.19)(typescript@5.6.3) + version: https://codeload.github.com/Lichthagel/eslint-config/tar.gz/60c629bb0f454a2aae12bc1ced251d452a6598ae(eslint-plugin-n@17.11.1(eslint@9.12.0))(eslint-plugin-solid@0.14.3(eslint@9.12.0)(typescript@5.6.3))(eslint@9.12.0)(svelte@4.2.19)(typescript@5.6.3) eslint: specifier: ^9.12.0 version: 9.12.0 - eslint-plugin-n: - specifier: ^17.11.1 - version: 17.11.1(eslint@9.12.0) + eslint-plugin-solid: + specifier: ^0.14.3 + version: 0.14.3(eslint@9.12.0)(typescript@5.6.3) solid-element: specifier: ^1.9.0 version: 1.9.0(solid-js@1.9.2) @@ -358,23 +358,20 @@ packages: '@jridgewell/trace-mapping@0.3.25': resolution: {integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==} - '@lichthagel/eslint-config@https://codeload.github.com/Lichthagel/eslint-config/tar.gz/759fe7cdca6baccf8d07bb0fee04e9caac25cb71': - resolution: {tarball: https://codeload.github.com/Lichthagel/eslint-config/tar.gz/759fe7cdca6baccf8d07bb0fee04e9caac25cb71} + '@lichthagel/eslint-config@https://codeload.github.com/Lichthagel/eslint-config/tar.gz/60c629bb0f454a2aae12bc1ced251d452a6598ae': + resolution: {tarball: https://codeload.github.com/Lichthagel/eslint-config/tar.gz/60c629bb0f454a2aae12bc1ced251d452a6598ae} version: 0.0.0 engines: {node: '>=16.0.0'} peerDependencies: eslint: '>=8.40.0' eslint-plugin-n: ^17.2.1 - eslint-plugin-react: ^7.34.1 - eslint-plugin-react-hooks: ^4.6.0 + eslint-plugin-solid: ^0.14.3 eslint-plugin-svelte: ^2.39.0 eslint-plugin-tailwindcss: ^3.17.4 peerDependenciesMeta: eslint-plugin-n: optional: true - eslint-plugin-react: - optional: true - eslint-plugin-react-hooks: + eslint-plugin-solid: optional: true eslint-plugin-svelte: optional: true @@ -818,6 +815,12 @@ packages: vue-eslint-parser: optional: true + eslint-plugin-solid@0.14.3: + resolution: {integrity: sha512-eDeyPrijSjVGeyb4oKoyidgLlMDZwAg/YdxiY9QvGXl2kLgpcHvLpgpaGK4KJ8xSsg0ym3B2dPRBAIlT7iUrEQ==} + engines: {node: '>=18.0.0'} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 || ^9.0.0 + eslint-plugin-unicorn@56.0.0: resolution: {integrity: sha512-aXpddVz/PQMmd69uxO98PA4iidiVNvA0xOtbpUoz1WhBd4RxOQQYqN618v68drY0hmy5uU2jy1bheKEVWBjlPw==} engines: {node: '>=18.18'} @@ -979,6 +982,10 @@ packages: html-entities@2.3.3: resolution: {integrity: sha512-DV5Ln36z34NNTDgnz0EWGBLZENelNAtkiFA4kyNOG2tDI6Mz1uSWiq1wAKdyjnJwyDiDO7Fa2SO1CTxPXL8VxA==} + html-tags@3.3.1: + resolution: {integrity: sha512-ztqyC3kLto0e9WbNp0aeP+M3kTt+nbaIveGmUxAtZa+8iFgKLUOD4YKM5j+f3QD89bra7UeumolZHKuOXnTmeQ==} + engines: {node: '>=8'} + htmlparser2@9.1.0: resolution: {integrity: sha512-5zfg6mHUoaer/97TxnGpxmbR7zJtPwIYFMZ/H5ucTlPZhKvtum05yiPK3Mgai3a0DyVxv7qYqoweaEd2nrYQzQ==} @@ -1009,6 +1016,9 @@ packages: resolution: {integrity: sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==} engines: {node: '>=8'} + inline-style-parser@0.2.4: + resolution: {integrity: sha512-0aO8FkhNZlj/ZIbNi7Lxxr12obT7cL1moPfE4tg1LkX7LlLfC6DeX4l2ZEud1ukP9jNQyNnfzQVqwbwmAATY4Q==} + is-arrayish@0.2.1: resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} @@ -1038,6 +1048,10 @@ packages: resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} engines: {node: '>=0.10.0'} + is-html@2.0.0: + resolution: {integrity: sha512-S+OpgB5i7wzIue/YSE5hg0e5ZYfG3hhpNh9KGl6ayJ38p7ED6wxQLd1TV91xHpcTvw90KMJ9EwN3F/iNflHBVg==} + engines: {node: '>=8'} + is-inside-container@1.0.0: resolution: {integrity: sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==} engines: {node: '>=14.16'} @@ -1110,9 +1124,15 @@ packages: engines: {node: '>=6'} hasBin: true + kebab-case@1.0.2: + resolution: {integrity: sha512-7n6wXq4gNgBELfDCpzKc+mRrZFs7D+wgfF5WRFLNAr4DA/qtr9Js8uOAVAfHhuLMfAcQ0pRKqbpjx+TcJVdE1Q==} + keyv@4.5.4: resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} + known-css-properties@0.30.0: + resolution: {integrity: sha512-VSWXYUnsPu9+WYKkfmJyLKtIvaRJi1kXUqVmBACORXZQxT5oZDsoZ2vQP+bQFDnWtpI/4eq3MLoRMjI2fnLzTQ==} + kolorist@1.8.0: resolution: {integrity: sha512-Y+60/zizpJ3HRH8DCss+q95yr6145JXZo46OTpFvDZWLfRCE4qChOyk1b26nMaNpfHHgxagk9dXT5OP0Tfe+dQ==} @@ -1452,6 +1472,9 @@ packages: resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} engines: {node: '>=8'} + style-to-object@1.0.8: + resolution: {integrity: sha512-xT47I/Eo0rwJmaXC4oilDGDWLohVhR6o/xAQcPQN8q6QBuZVL8qMYL85kLmST5cPjAorwvqIA4qXTRQoYHaL6g==} + supports-color@5.5.0: resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} engines: {node: '>=4'} @@ -1948,7 +1971,7 @@ snapshots: '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.5.0 - '@lichthagel/eslint-config@https://codeload.github.com/Lichthagel/eslint-config/tar.gz/759fe7cdca6baccf8d07bb0fee04e9caac25cb71(eslint-plugin-n@17.11.1(eslint@9.12.0))(eslint@9.12.0)(svelte@4.2.19)(typescript@5.6.3)': + '@lichthagel/eslint-config@https://codeload.github.com/Lichthagel/eslint-config/tar.gz/60c629bb0f454a2aae12bc1ced251d452a6598ae(eslint-plugin-n@17.11.1(eslint@9.12.0))(eslint-plugin-solid@0.14.3(eslint@9.12.0)(typescript@5.6.3))(eslint@9.12.0)(svelte@4.2.19)(typescript@5.6.3)': dependencies: '@eslint/js': 9.12.0 '@stylistic/eslint-plugin': 2.9.0(eslint@9.12.0)(typescript@5.6.3) @@ -1959,6 +1982,7 @@ snapshots: typescript-eslint: 8.8.1(eslint@9.12.0)(typescript@5.6.3) optionalDependencies: eslint-plugin-n: 17.11.1(eslint@9.12.0) + eslint-plugin-solid: 0.14.3(eslint@9.12.0)(typescript@5.6.3) transitivePeerDependencies: - astro-eslint-parser - supports-color @@ -2348,6 +2372,7 @@ snapshots: dependencies: graceful-fs: 4.2.11 tapable: 2.2.1 + optional: true entities@4.5.0: {} @@ -2391,6 +2416,7 @@ snapshots: dependencies: eslint: 9.12.0 semver: 7.6.3 + optional: true eslint-plugin-es-x@7.8.0(eslint@9.12.0): dependencies: @@ -2398,6 +2424,7 @@ snapshots: '@eslint-community/regexpp': 4.11.1 eslint: 9.12.0 eslint-compat-utils: 0.5.1(eslint@9.12.0) + optional: true eslint-plugin-n@17.11.1(eslint@9.12.0): dependencies: @@ -2410,6 +2437,7 @@ snapshots: ignore: 5.3.2 minimatch: 9.0.5 semver: 7.6.3 + optional: true eslint-plugin-perfectionist@3.8.0(eslint@9.12.0)(svelte@4.2.19)(typescript@5.6.3): dependencies: @@ -2424,6 +2452,19 @@ snapshots: - supports-color - typescript + eslint-plugin-solid@0.14.3(eslint@9.12.0)(typescript@5.6.3): + dependencies: + '@typescript-eslint/utils': 8.8.1(eslint@9.12.0)(typescript@5.6.3) + eslint: 9.12.0 + estraverse: 5.3.0 + is-html: 2.0.0 + kebab-case: 1.0.2 + known-css-properties: 0.30.0 + style-to-object: 1.0.8 + transitivePeerDependencies: + - supports-color + - typescript + eslint-plugin-unicorn@56.0.0(eslint@9.12.0): dependencies: '@babel/helper-validator-identifier': 7.25.7 @@ -2595,6 +2636,7 @@ snapshots: get-tsconfig@4.8.1: dependencies: resolve-pkg-maps: 1.0.0 + optional: true glob-parent@5.1.2: dependencies: @@ -2610,7 +2652,8 @@ snapshots: globals@15.11.0: {} - graceful-fs@4.2.11: {} + graceful-fs@4.2.11: + optional: true graphemer@1.4.0: {} @@ -2626,6 +2669,8 @@ snapshots: html-entities@2.3.3: {} + html-tags@3.3.1: {} + htmlparser2@9.1.0: dependencies: domelementtype: 2.3.0 @@ -2650,6 +2695,8 @@ snapshots: indent-string@4.0.0: {} + inline-style-parser@0.2.4: {} + is-arrayish@0.2.1: {} is-builtin-module@3.2.1: @@ -2670,6 +2717,10 @@ snapshots: dependencies: is-extglob: 2.1.1 + is-html@2.0.0: + dependencies: + html-tags: 3.3.1 + is-inside-container@1.0.0: dependencies: is-docker: 3.0.0 @@ -2722,10 +2773,14 @@ snapshots: json5@2.2.3: {} + kebab-case@1.0.2: {} + keyv@4.5.4: dependencies: json-buffer: 3.0.1 + known-css-properties@0.30.0: {} + kolorist@1.8.0: {} levn@0.4.1: @@ -2956,7 +3011,8 @@ snapshots: resolve-from@4.0.0: {} - resolve-pkg-maps@1.0.0: {} + resolve-pkg-maps@1.0.0: + optional: true resolve@1.22.8: dependencies: @@ -3062,6 +3118,10 @@ snapshots: strip-json-comments@3.1.1: {} + style-to-object@1.0.8: + dependencies: + inline-style-parser: 0.2.4 + supports-color@5.5.0: dependencies: has-flag: 3.0.0 @@ -3092,7 +3152,8 @@ snapshots: systemjs@6.15.1: {} - tapable@2.2.1: {} + tapable@2.2.1: + optional: true text-table@0.2.0: {} diff --git a/src/modules/anisongs/components/Anisongs.tsx b/src/modules/anisongs/components/Anisongs.tsx index 2df6079..8a25cc1 100644 --- a/src/modules/anisongs/components/Anisongs.tsx +++ b/src/modules/anisongs/components/Anisongs.tsx @@ -12,8 +12,8 @@ type Props = { mediaId: string | null; }; -const Anisongs: Component = ({ mediaId }) => { - const [data] = createResource(mediaId, async (mediaId) => { +const Anisongs: Component = (props) => { + const [data] = createResource(() => props.mediaId, async (mediaId) => { const cache = sessionStorage.getItem(`lichtSong${mediaId}`); // check if request needed diff --git a/src/modules/anisongs/components/Theme.tsx b/src/modules/anisongs/components/Theme.tsx index be97622..3ff569b 100644 --- a/src/modules/anisongs/components/Theme.tsx +++ b/src/modules/anisongs/components/Theme.tsx @@ -8,23 +8,23 @@ type Props = { theme: AnimeTheme; }; -const Theme: Component = ({ theme }) => ( +const Theme: Component = (props) => (
- {theme.slug} - {theme.song.title} + {props.theme.slug} + {props.theme.song.title}
- -
{theme.group}
+ +
{props.theme.group}
- 0}> + 0}>
Artist(s): {" "} - {theme.song.artists!.map((artist) => artist_to_string(artist)).join(", ")} + {props.theme.song.artists!.map((artist) => artist_to_string(artist)).join(", ")}
- + {(entry) => ( )} diff --git a/src/modules/anisongs/components/ThemeEntry.tsx b/src/modules/anisongs/components/ThemeEntry.tsx index 5958a14..6ef326d 100644 --- a/src/modules/anisongs/components/ThemeEntry.tsx +++ b/src/modules/anisongs/components/ThemeEntry.tsx @@ -9,21 +9,21 @@ type Props = { entry: AnimeThemeEntry; }; -const ThemeEntry: Component = ({ entry }) => ( +const ThemeEntry: Component = (props) => (
- -
{`v${entry.version}`}
+ +
{`v${props.entry.version}`}
- -
{`Episode(s): ${entry.episodes}`}
+ +
{`Episode(s): ${props.entry.episodes}`}
- +
NSFW
- +
Spoiler
- +
); diff --git a/src/modules/anisongs/components/Themes.tsx b/src/modules/anisongs/components/Themes.tsx index 05f1929..4402e85 100644 --- a/src/modules/anisongs/components/Themes.tsx +++ b/src/modules/anisongs/components/Themes.tsx @@ -9,13 +9,13 @@ type Props = { heading: string; }; -const Themes: Component = ({ themes, heading }) => ( +const Themes: Component = (props) => (
-

{heading}

- +

{props.heading}

+
Nothing found
- + {(theme) => ( )} diff --git a/src/modules/anisongs/components/Videos.tsx b/src/modules/anisongs/components/Videos.tsx index df1af32..bf7fb96 100644 --- a/src/modules/anisongs/components/Videos.tsx +++ b/src/modules/anisongs/components/Videos.tsx @@ -15,7 +15,7 @@ const handleVolumeChange = (event: Event) => { localStorage.setItem("lichtSongsVolume", target.volume.toString()); }; -const Videos: Component = ({ videos }) => { +const Videos: Component = (props) => { const [activeVideo, setActiveVideo] = createSignal