Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,5 @@ tailwind.config.cjs
tsconfig.json
.pnpm-store
src/i18n
.devcontainer/devcontainer.json
.devcontainer/devcontainer.json
.vscode/
Binary file modified bun.lockb
Binary file not shown.
81 changes: 33 additions & 48 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import typescriptParser from '@typescript-eslint/parser';
import typescriptPlugin from '@typescript-eslint/eslint-plugin';
import sveltePlugin from "eslint-plugin-svelte";
import svelteParser from "svelte-eslint-parser";
import js from '@eslint/js';
import ts from 'typescript-eslint';
import svelte from 'eslint-plugin-svelte';
import globals from 'globals';


const rules = {
'array-callback-return': 'error',
Expand All @@ -26,65 +27,49 @@ const rules = {
'no-shadow': 'error',
'no-use-before-define': 'error',
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': ['error', {
varsIgnorePattern: '^_',
argsIgnorePattern: '^_'
}]
'@typescript-eslint/no-unused-vars': [
'warn', {
varsIgnorePattern: '^_',
argsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_',
}
],
// TODO: This was disabled to due the explicit side-effect style in svelte (`$: ...`). Can be re-enabled with runes
'@typescript-eslint/no-unused-expressions': 'off',
'svelte/no-at-html-tags': 'warn',
};

export default [
js.configs.recommended,
...ts.configs.recommended,
...svelte.configs['flat/recommended'],
{
languageOptions: {
globals: {
...globals.browser,
...globals.node,
},
},
},
{
ignores: [
".svelte-kit/**/*",
"node_modules/**/*",
"dist/**/*",
"build/**/*",
"src/i18n/**/*"
"src/i18n/**/*",
"postcss.config.cjs",
],
},

{
files: ["**/*.ts"],
ignores: [
"custom-theme.ts",
"src/service-worker.ts",
"tailwind.config.ts"
],
languageOptions: {
parser: typescriptParser,
parserOptions: {
project: "./tsconfig.json",
extraFileExtensions: [".svelte"],
},
},
plugins: {
"@typescript-eslint": typescriptPlugin,
},
rules: {
...typescriptPlugin.configs.recommended.rules,
...rules
},
},

{
files: ["**/*.svelte"],
languageOptions: {
parser: svelteParser,
parserOptions: {
parser: typescriptParser,
project: "./tsconfig.json",
extraFileExtensions: [".svelte"],
parser: ts.parser,
},
},
plugins: {
svelte: sveltePlugin,
"@typescript-eslint": typescriptPlugin,
},
rules: {
...typescriptPlugin.configs.recommended.rules,
...sveltePlugin.configs.recommended.rules,
...rules,
'svelte/no-at-html-tags': 'off'
},
},
];
{
rules
}
];
22 changes: 14 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@
"format": "prettier --write . && eslint . --fix",
"translations": "bash ./download_translations.sh"
},
"config": {
"commitizen": {
"path": "@commitlint/cz-commitlint"
}
},
"dependencies": {
"@felte/core": "^1.4.3",
"@felte/reporter-svelte": "^1.1.11",
Expand All @@ -46,15 +51,16 @@
"prismjs": "^1.29.0",
"semver": "^7.6.3",
"socket.io-client": "^4.7.5",
"tslib": "^2.6.3",
"thumbhash": "^0.1.1",
"tslib": "^2.6.3",
"wonka": "^6.3.4",
"zod": "^3.23.8"
},
"devDependencies": {
"@cfworker/json-schema": "^1.12.8",
"@commitlint/cli": "^19.3.0",
"@commitlint/config-conventional": "^19.2.2",
"@commitlint/config-conventional": "^19.3.0",
"@commitlint/cz-commitlint": "^19.5.0",
"@eslint/eslintrc": "^3.1.0",
"@graphql-codegen/add": "^5.0.3",
"@graphql-codegen/cli": "^5.0.2",
Expand All @@ -80,21 +86,20 @@
"@types/node": "^20.14.12",
"@types/prismjs": "^1.26.4",
"@types/semver": "^7.5.8",
"@typescript-eslint/eslint-plugin": "^7.17.0",
"@typescript-eslint/parser": "^7.17.0",
"autoprefixer": "^10.4.19",
"chokidar-cli": "^3.0.0",
"concurrently": "^8.2.2",
"cookieconsent": "^3.1.1",
"cross-env": "^7.0.3",
"cssnano": "^7.0.4",
"cz-conventional-changelog": "^3.3.0",
"cz": "^1.8.2",
"dotenv-flow": "^4.1.0",
"eslint": "^9.7.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-svelte": "^2.43.0",
"eslint": "^9.7",
"eslint-config-prettier": "^9.1",
"eslint-plugin-svelte": "^2.43",
"graphql-tag": "^2.12.6",
"husky": "^9.1.1",
"inquirer": "9",
"postcss": "^8.4.40",
"postcss-import-url": "^7.2.0",
"postcss-load-config": "^6.0.1",
Expand All @@ -110,6 +115,7 @@
"svelte-preprocess": "^6.0.2",
"tailwindcss": "^3.4.6",
"typescript": "^5.5.4",
"typescript-eslint": "^8.13.0",
"urql": "^4.1.0",
"vite": "^5.3.5",
"vite-plugin-tailwind-purgecss": "^0.3.3"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
<span style="padding: 2px; white-space:normal">
{#if compatibility?.EA?.note}
{#await markdown(compatibility.EA.note) then rendered}
{@html rendered}
{@html rendered} <!-- eslint-disable-line svelte/no-at-html-tags -->
{/await}
{:else}
{noNotesText}
Expand All @@ -72,7 +72,7 @@
<span style="padding: 2px; white-space:normal">
{#if compatibility?.EXP?.note}
{#await markdown(compatibility.EXP.note) then rendered}
{@html rendered}
{@html rendered} <!-- eslint-disable-line svelte/no-at-html-tags -->
{/await}
{:else}
{noNotesText}
Expand Down
2 changes: 1 addition & 1 deletion src/lib/utils/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const modStatus = (latestVersions?: {
}
result = 'own-risk';
}
} catch (e) {
} catch (_e) {
// Ignored
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/lib/utils/uplugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const resolveValue = (object: unknown, path: string) => {
key = parser.exec(path);
}
return value;
} catch (e) {
} catch (_e) {
// Ignore exception
}

Expand Down Expand Up @@ -56,7 +56,7 @@ export const validateUPluginJson = async (input: string): Promise<string[]> => {
return message;
})
.filter((v) => !!v);
} catch (e) {
} catch (_e) {
return ['Invalid JSON'];
}
};