From e52e46a140c6df1cd959bcda6a1ac2053cb89e37 Mon Sep 17 00:00:00 2001 From: maalni Date: Tue, 16 Jan 2024 23:07:51 +0100 Subject: [PATCH 1/2] feat: Add github action to check code quality * feat: Add github action to check code quality * fix: Increase actions version * fix: Set node version to lts/Iron * fix: Run pnpm installation --- .github/workflows/check-code-quality.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/check-code-quality.yml diff --git a/.github/workflows/check-code-quality.yml b/.github/workflows/check-code-quality.yml new file mode 100644 index 00000000..d7771357 --- /dev/null +++ b/.github/workflows/check-code-quality.yml @@ -0,0 +1,24 @@ +name: check-code-quality +run-name: Check code quality +on: [pull_request] +jobs: + check-typescript: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: lts/Iron + - run: npm install -g pnpm + - run: pnpm install + - run: pnpm tsc + check-prettier: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: lts/Iron + - run: npm install -g pnpm + - run: pnpm install + - run: pnpm run lint From 67a988503ec4c4204136854b4167af4a497fc881 Mon Sep 17 00:00:00 2001 From: maalni Date: Tue, 16 Jan 2024 23:10:49 +0100 Subject: [PATCH 2/2] fix: Prettier errors (#27) * fix: Run prettier and set endOfLine property explicitly to lf * fix: Remove unused imports --- .prettierrc | 1 + src/lib/components/navigator/Sidebar.svelte | 2 +- src/lib/components/ui/button/index.ts | 10 +++---- src/lib/components/ui/card/card.svelte | 2 +- src/routes/+page.svelte | 33 ++++++++++----------- src/routes/settings/+page.svelte | 2 +- tailwind.config.js | 8 ++--- 7 files changed, 27 insertions(+), 31 deletions(-) diff --git a/.prettierrc b/.prettierrc index 95730232..d73a6a79 100644 --- a/.prettierrc +++ b/.prettierrc @@ -3,6 +3,7 @@ "singleQuote": true, "trailingComma": "none", "printWidth": 100, + "endOfLine": "lf", "plugins": ["prettier-plugin-svelte"], "overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }] } diff --git a/src/lib/components/navigator/Sidebar.svelte b/src/lib/components/navigator/Sidebar.svelte index 4e9abbc7..085deeed 100644 --- a/src/lib/components/navigator/Sidebar.svelte +++ b/src/lib/components/navigator/Sidebar.svelte @@ -231,4 +231,4 @@ - \ No newline at end of file + diff --git a/src/lib/components/ui/button/index.ts b/src/lib/components/ui/button/index.ts index 4a42d1e6..17f86bc2 100644 --- a/src/lib/components/ui/button/index.ts +++ b/src/lib/components/ui/button/index.ts @@ -7,10 +7,8 @@ const buttonVariants = tv({ variants: { variant: { default: 'justify-center bg-primary text-primary-foreground hover:bg-fill/20', - destructive: - 'justify-center bg-destructive text-destructive-foreground hover:bg-fill/20', - outline: - 'justify-center border border-input bg-background hover:bg-accent hover:bg-fill/20', + destructive: 'justify-center bg-destructive text-destructive-foreground hover:bg-fill/20', + outline: 'justify-center border border-input bg-background hover:bg-accent hover:bg-fill/20', secondary: 'justify-center bg-secondary text-secondary-foreground hover:bg-fill/20', ghost: 'justify-center hover:bg-accent hover:text-accent-foreground', link: 'justify-center text-primary underline-offset-4 hover:bg-fill/20', @@ -26,7 +24,7 @@ const buttonVariants = tv({ default: 'h-10 px-4 py-2', sm: 'h-9 rounded-md px-3', lg: 'h-11 rounded-md px-8', - icon: 'h-10 w-10', + icon: 'h-10 w-10' } }, defaultVariants: { @@ -54,4 +52,4 @@ export { type Props as ButtonProps, type Events as ButtonEvents, buttonVariants -}; \ No newline at end of file +}; diff --git a/src/lib/components/ui/card/card.svelte b/src/lib/components/ui/card/card.svelte index e301a4fb..9f78522b 100644 --- a/src/lib/components/ui/card/card.svelte +++ b/src/lib/components/ui/card/card.svelte @@ -10,4 +10,4 @@
-
\ No newline at end of file + diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index eb4833a9..4b2f3fa0 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -1,23 +1,20 @@ - +
- - - - Changelog: - - -

Changelog TXT

-
- - - - -
-
\ No newline at end of file + + + + Changelog: + + +

Changelog TXT

+
+ + + + +
+ diff --git a/src/routes/settings/+page.svelte b/src/routes/settings/+page.svelte index 7edd085e..6a65c1e2 100644 --- a/src/routes/settings/+page.svelte +++ b/src/routes/settings/+page.svelte @@ -131,4 +131,4 @@ - \ No newline at end of file + diff --git a/tailwind.config.js b/tailwind.config.js index 0cb710f0..a3741a9a 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -3,7 +3,7 @@ import { createThemes } from 'tw-colors'; /* eslint-disable @typescript-eslint/naming-convention */ /** @type {import('tailwindcss').Config} */ const config = { - darkMode: ['class'], + darkMode: ['class'], content: ['./src/**/*.{html,js,svelte,ts}'], corePlugins: { preflight: true @@ -27,8 +27,8 @@ const config = { }, fontFamily: { sans: [...fontFamily.sans] - } - }, + } + } }, plugins: [ createThemes( @@ -70,4 +70,4 @@ const config = { ] }; -export default config; \ No newline at end of file +export default config;