Skip to content

Commit

Permalink
chore: format and update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
C4illin committed Sep 24, 2024
1 parent e573997 commit 4c747e8
Show file tree
Hide file tree
Showing 7 changed files with 96 additions and 83 deletions.
Binary file modified bun.lockb
Binary file not shown.
10 changes: 6 additions & 4 deletions compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ services:
# dockerfile: Debian.Dockerfile
volumes:
- ./data:/app/data
environment:
- ACCOUNT_REGISTRATION=true
- JWT_SECRET=aLongAndSecretStringUsedToSignTheJSONWebToken1234
- ALLOW_UNAUTHENTICATED=true
environment: # Defaults are listed below. All are optional.
- ACCOUNT_REGISTRATION=true # true or false, doesn't matter for the first account (e.g. keep this to false if you only want one account)
- JWT_SECRET=aLongAndSecretStringUsedToSignTheJSONWebToken1234 # will use randomUUID() by default
- HTTP_ALLOWED=true # setting this to true is unsafe, only set this to true locally
- ALLOW_UNAUTHENTICATED=true # allows anyone to use the service without logging in, only set this to true locally
- AUTO_DELETE_EVERY_N_HOURS=1 # checks every n hours for files older then n hours and deletes them, set to 0 to disable
ports:
- 3000:3000
15 changes: 13 additions & 2 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ import { fixupPluginRules } from "@eslint/compat";
import tseslint from "typescript-eslint";
import eslint from "@eslint/js";
import deprecationPlugin from "eslint-plugin-deprecation";
import eslintCommentsPlugin from "eslint-plugin-eslint-comments";
import importPlugin from "eslint-plugin-import";
import simpleImportSortPlugin from "eslint-plugin-simple-import-sort";
import tailwind from "eslint-plugin-tailwindcss";
import comments from "@eslint-community/eslint-plugin-eslint-comments/configs"

export default tseslint.config(
{
plugins: {
"@typescript-eslint": tseslint.plugin,
deprecation: fixupPluginRules(deprecationPlugin),
"eslint-comments": eslintCommentsPlugin,
import: fixupPluginRules(importPlugin),
"simple-import-sort": simpleImportSortPlugin,
},
Expand All @@ -20,8 +20,10 @@ export default tseslint.config(
ignores: ["**/node_modules/**", "**/public/**"],
},
eslint.configs.recommended,
comments.recommended,
...tseslint.configs.recommendedTypeChecked,
...tseslint.configs.stylisticTypeChecked,
...tailwind.configs["flat/recommended"],
{
languageOptions: {
parserOptions: {
Expand All @@ -32,5 +34,14 @@ export default tseslint.config(
project: ["./tsconfig.json"],
},
},
rules: {
"tailwindcss/no-custom-classname": [
"error",
{
"config": "./tailwind.config.js",
"whitelist": ['select_container', 'convert_to_popup', 'convert_to_group', 'target', 'convert_to_target']
}
],
}
},
);
31 changes: 17 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@elysiajs/html": "1.0.2",
"@elysiajs/jwt": "^1.1.1",
"@elysiajs/static": "1.0.3",
"elysia": "^1.1.12"
"elysia": "^1.1.16"
},
"module": "src/index.tsx",
"type": "module",
Expand All @@ -25,37 +25,40 @@
},
"devDependencies": {
"@biomejs/biome": "1.9.2",
"@eslint-community/eslint-plugin-eslint-comments": "^4.4.0",
"@eslint/compat": "^1.1.1",
"@eslint/js": "^9.9.1",
"@eslint/js": "^9.11.1",
"@ianvs/prettier-plugin-sort-imports": "^4.3.1",
"@kitajs/ts-html-plugin": "^4.0.2",
"@kitajs/ts-html-plugin": "^4.1.0",
"@picocss/pico": "^2.0.6",
"@total-typescript/ts-reset": "^0.6.1",
"@types/bun": "^1.1.8",
"@types/bun": "^1.1.10",
"@types/eslint": "^9.6.1",
"@types/node": "^22.5.4",
"@typescript-eslint/eslint-plugin": "^8.4.0",
"@typescript-eslint/parser": "^8.4.0",
"@types/eslint-plugin-tailwindcss": "^3.17.0",
"@types/eslint__js": "^8.42.3",
"@types/node": "^22.6.1",
"@typescript-eslint/eslint-plugin": "^8.7.0",
"@typescript-eslint/parser": "^8.7.0",
"autoprefixer": "^10.4.20",
"cssnano": "^7.0.6",
"eslint": "^9.9.1",
"eslint": "^9.11.1",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-deprecation": "^3.0.0",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-import": "^2.30.0",
"eslint-plugin-isaacscript": "^4.0.0",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-simple-import-sort": "^12.1.1",
"knip": "^5.29.2",
"npm-run-all2": "^6.2.2",
"eslint-plugin-tailwindcss": "^3.17.4",
"knip": "^5.30.5",
"npm-run-all2": "^6.2.3",
"postcss": "^8.4.47",
"postcss-cli": "^11.0.0",
"postcss-lightningcss": "^1.0.1",
"prettier": "^3.3.3",
"tailwind-scrollbar": "^3.1.0",
"tailwindcss": "^3.4.12",
"typescript": "^5.5.4",
"typescript-eslint": "^8.4.0"
"tailwindcss": "^3.4.13",
"typescript": "^5.6.2",
"typescript-eslint": "^8.7.0"
},
"trustedDependencies": [
"@biomejs/biome"
Expand Down
26 changes: 10 additions & 16 deletions src/converters/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,15 @@ import { normalizeFiletype } from "../helpers/normalizeFiletype";

// This should probably be reconstructed so that the functions are not imported instead the functions hook into this to make the converters more modular

const properties: {
[key: string]: {
const properties: Record<string, {
properties: {
from: { [key: string]: string[] };
to: { [key: string]: string[] };
options?: {
[key: string]: {
[key: string]: {
from: Record<string, string[]>;
to: Record<string, string[]>;
options?: Record<string, Record<string, {
description: string;
type: string;
default: number;
};
};
};
}>>;
};
converter: (
filePath: string,
Expand All @@ -58,8 +53,7 @@ const properties: {
options?: any,
// biome-ignore lint/suspicious/noExplicitAny: <explanation>
) => any;
};
} = {
}> = {
libjxl: {
properties: propertiesLibjxl,
converter: convertLibjxl,
Expand Down Expand Up @@ -159,7 +153,7 @@ export async function mainConverter(
}
}

const possibleTargets: { [key: string]: { [key: string]: string[] } } = {};
const possibleTargets: Record<string, Record<string, string[]>> = {};

for (const converterName in properties) {
const converterProperties = properties[converterName]?.properties;
Expand All @@ -186,7 +180,7 @@ for (const converterName in properties) {

export const getPossibleTargets = (
from: string,
): { [key: string]: string[] } => {
): Record<string, string[]> => {
const fromClean = normalizeFiletype(from);

return possibleTargets[fromClean] || {};
Expand Down Expand Up @@ -214,7 +208,7 @@ const getPossibleInputs = () => {
return possibleInputs;
};

const allTargets: { [key: string]: string[] } = {};
const allTargets: Record<string, string[]> = {};

for (const converterName in properties) {
const converterProperties = properties[converterName]?.properties;
Expand All @@ -236,7 +230,7 @@ export const getAllTargets = () => {
return allTargets;
};

const allInputs: { [key: string]: string[] } = {};
const allInputs: Record<string, string[]> = {};
for (const converterName in properties) {
const converterProperties = properties[converterName]?.properties;

Expand Down
Loading

0 comments on commit 4c747e8

Please sign in to comment.