From 832e29bd92a7626c46cd4e2c71baafdc8bc71a46 Mon Sep 17 00:00:00 2001 From: Wayne <5291640+ringoinca@users.noreply.github.com> Date: Fri, 15 Aug 2025 13:45:58 +0300 Subject: [PATCH] Project prettier setup --- .prettierignore | 13 ++++++ .prettierrc | 15 +++++++ CODE_OF_CONDUCT.md | 30 +++++++------- CONTRIBUTING.md | 18 ++++---- package.json | 68 +++++++++++++++---------------- packages/frontend/.prettierignore | 4 ++ packages/frontend/.prettierrc | 5 +-- pnpm-lock.yaml | 11 ++--- 8 files changed, 97 insertions(+), 67 deletions(-) create mode 100644 .prettierignore create mode 100644 .prettierrc diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..5b190cb --- /dev/null +++ b/.prettierignore @@ -0,0 +1,13 @@ +# Ignore artifacts +dist +.svelte-kit +build +node_modules +pnpm-lock.yaml +meili_data/ + +## shadcn installs +components/ui/ + +# Ignore logs +*.log diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..7ebb855 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,15 @@ +{ + "useTabs": true, + "singleQuote": true, + "trailingComma": "none", + "printWidth": 100, + "plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"], + "overrides": [ + { + "files": "*.svelte", + "options": { + "parser": "svelte" + } + } + ] +} diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 9f388d1..678766e 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -16,24 +16,24 @@ We pledge to act and interact in ways that are welcoming, open, and respectful. Examples of behavior that contributes to a positive environment for our community include: -- Demonstrating empathy and kindness toward other people -- Being respectful of differing opinions, viewpoints, and experiences -- Giving and gracefully accepting constructive feedback -- Accepting responsibility and apologizing to those affected by our mistakes, - and learning from the experience -- Focusing on what is best not just for us as individuals, but for the - overall community +- Demonstrating empathy and kindness toward other people +- Being respectful of differing opinions, viewpoints, and experiences +- Giving and gracefully accepting constructive feedback +- Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +- Focusing on what is best not just for us as individuals, but for the + overall community Examples of unacceptable behavior include: -- The use of sexualized language or imagery, and sexual attention or - advances of any kind -- Trolling, insulting or derogatory comments, and personal or political attacks -- Public or private harassment -- Publishing others' private information, such as a physical or email - address, without their explicit permission -- Other conduct which could reasonably be considered inappropriate in a - professional setting +- The use of sexualized language or imagery, and sexual attention or + advances of any kind +- Trolling, insulting or derogatory comments, and personal or political attacks +- Public or private harassment +- Publishing others' private information, such as a physical or email + address, without their explicit permission +- Other conduct which could reasonably be considered inappropriate in a + professional setting ## Enforcement Responsibilities diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0f61263..edf78f0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -6,8 +6,8 @@ First off, thank you for considering contributing to Open Archiver! It's people Not sure where to start? You can: -- Look through the [open issues](https://github.com/LogicLabs-OU/OpenArchiver/issues) for bugs or feature requests. -- Check the issues labeled `good first issue` for tasks that are a good entry point into the codebase. +- Look through the [open issues](https://github.com/LogicLabs-OU/OpenArchiver/issues) for bugs or feature requests. +- Check the issues labeled `good first issue` for tasks that are a good entry point into the codebase. ## How to Contribute @@ -41,13 +41,13 @@ This project and everyone participating in it is governed by the [Open Archiver ### Git Commit Messages -- Use the present tense ("Add feature" not "Added feature"). -- Use the imperative mood ("Move cursor to..." not "Moves cursor to..."). -- Limit the first line to 72 characters or less. -- Reference issues and pull requests liberally after the first line. +- Use the present tense ("Add feature" not "Added feature"). +- Use the imperative mood ("Move cursor to..." not "Moves cursor to..."). +- Limit the first line to 72 characters or less. +- Reference issues and pull requests liberally after the first line. ### TypeScript Styleguide -- Follow the existing code style. -- Use TypeScript's strict mode. -- Avoid using `any` as a type. Define clear interfaces and types in the `packages/types` directory. +- Follow the existing code style. +- Use TypeScript's strict mode. +- Avoid using `any` as a type. Define clear interfaces and types in the `packages/types` directory. diff --git a/package.json b/package.json index 55fe99f..298a74a 100644 --- a/package.json +++ b/package.json @@ -1,36 +1,36 @@ { - "name": "open-archiver", - "private": true, - "scripts": { - "dev": "dotenv -- pnpm --filter \"./packages/*\" --parallel dev", - "build": "pnpm --filter \"./packages/*\" build", - "start": "dotenv -- pnpm --filter \"./packages/*\" --parallel start", - "start:workers": "dotenv -- concurrently \"pnpm --filter @open-archiver/backend start:ingestion-worker\" \"pnpm --filter @open-archiver/backend start:indexing-worker\" \"pnpm --filter @open-archiver/backend start:sync-scheduler\"", - "start:workers:dev": "dotenv -- concurrently \"pnpm --filter @open-archiver/backend start:ingestion-worker:dev\" \"pnpm --filter @open-archiver/backend start:indexing-worker:dev\" \"pnpm --filter @open-archiver/backend start:sync-scheduler:dev\"", - "db:generate": "dotenv -- pnpm --filter @open-archiver/backend db:generate", - "db:migrate": "dotenv -- pnpm --filter @open-archiver/backend db:migrate", - "db:migrate:dev": "dotenv -- pnpm --filter @open-archiver/backend db:migrate:dev", - "docker-start": "concurrently \"pnpm start:workers\" \"pnpm start\"", - "docs:dev": "vitepress dev docs --port 3009", - "docs:build": "vitepress build docs", - "docs:preview": "vitepress preview docs" - }, - "dependencies": { - "concurrently": "^9.2.0", - "dotenv-cli": "8.0.0" - }, - "devDependencies": { - "typescript": "5.8.3", - "vitepress": "^1.6.3" - }, - "packageManager": "pnpm@10.13.1", - "engines": { - "node": ">=22.0.0", - "pnpm": "10.13.1" - }, - "pnpm": { - "onlyBuiltDependencies": [ - "esbuild" - ] - } + "name": "open-archiver", + "private": true, + "scripts": { + "dev": "dotenv -- pnpm --filter \"./packages/*\" --parallel dev", + "build": "pnpm --filter \"./packages/*\" build", + "start": "dotenv -- pnpm --filter \"./packages/*\" --parallel start", + "start:workers": "dotenv -- concurrently \"pnpm --filter @open-archiver/backend start:ingestion-worker\" \"pnpm --filter @open-archiver/backend start:indexing-worker\" \"pnpm --filter @open-archiver/backend start:sync-scheduler\"", + "start:workers:dev": "dotenv -- concurrently \"pnpm --filter @open-archiver/backend start:ingestion-worker:dev\" \"pnpm --filter @open-archiver/backend start:indexing-worker:dev\" \"pnpm --filter @open-archiver/backend start:sync-scheduler:dev\"", + "db:generate": "dotenv -- pnpm --filter @open-archiver/backend db:generate", + "db:migrate": "dotenv -- pnpm --filter @open-archiver/backend db:migrate", + "db:migrate:dev": "dotenv -- pnpm --filter @open-archiver/backend db:migrate:dev", + "docker-start": "concurrently \"pnpm start:workers\" \"pnpm start\"", + "docs:dev": "vitepress dev docs --port 3009", + "docs:build": "vitepress build docs", + "docs:preview": "vitepress preview docs" + }, + "dependencies": { + "concurrently": "^9.2.0", + "dotenv-cli": "8.0.0" + }, + "devDependencies": { + "typescript": "5.8.3", + "vitepress": "^1.6.4" + }, + "packageManager": "pnpm@10.13.1", + "engines": { + "node": ">=22.0.0", + "pnpm": "10.13.1" + }, + "pnpm": { + "onlyBuiltDependencies": [ + "esbuild" + ] + } } diff --git a/packages/frontend/.prettierignore b/packages/frontend/.prettierignore index 7d74fe2..da0b565 100644 --- a/packages/frontend/.prettierignore +++ b/packages/frontend/.prettierignore @@ -5,5 +5,9 @@ yarn.lock bun.lock bun.lockb +## shadcn components +components/ui/ + + # Miscellaneous /static/ diff --git a/packages/frontend/.prettierrc b/packages/frontend/.prettierrc index b19073e..7ebb855 100644 --- a/packages/frontend/.prettierrc +++ b/packages/frontend/.prettierrc @@ -3,10 +3,7 @@ "singleQuote": true, "trailingComma": "none", "printWidth": 100, - "plugins": [ - "prettier-plugin-svelte", - "prettier-plugin-tailwindcss" - ], + "plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"], "overrides": [ { "files": "*.svelte", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e158389..54c9ef5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -19,8 +19,8 @@ importers: specifier: 5.8.3 version: 5.8.3 vitepress: - specifier: ^1.6.3 - version: 1.6.3(@algolia/client-search@5.34.1)(@types/node@24.0.13)(axios@1.10.0)(lightningcss@1.30.1)(postcss@8.5.6)(search-insights@2.17.3)(typescript@5.8.3) + specifier: ^1.6.4 + version: 1.6.4(@algolia/client-search@5.34.1)(@types/node@24.0.13)(axios@1.10.0)(lightningcss@1.30.1)(postcss@8.5.6)(search-insights@2.17.3)(typescript@5.8.3) packages/backend: dependencies: @@ -3707,6 +3707,7 @@ packages: resolution: {integrity: sha512-Nkwo9qeCvqVH0ZgYRUfPyj6o4o7StvNIxMFECeiz4y0uMOVyqc5Y9hjsdFVxdYCeiUjjXLQXA8KIz0iJL3HM0w==} engines: {node: '>=20.18.0'} hasBin: true + bundledDependencies: [] peberminta@0.9.0: resolution: {integrity: sha512-XIxfHpEuSJbITd1H3EeQwpcZbTLHc+VVr8ANI9t5sit565tsI4/xK3KWTUFE2e6QiangUkh3B0jihzmGnNrRsQ==} @@ -4640,8 +4641,8 @@ packages: vite: optional: true - vitepress@1.6.3: - resolution: {integrity: sha512-fCkfdOk8yRZT8GD9BFqusW3+GggWYZ/rYncOfmgcDtP3ualNHCAg+Robxp2/6xfH1WwPHtGpPwv7mbA3qomtBw==} + vitepress@1.6.4: + resolution: {integrity: sha512-+2ym1/+0VVrbhNyRoFFesVvBvHAVMZMK0rw60E3X/5349M1GuVdKeazuksqopEdvkKwKGs21Q729jX81/bkBJg==} hasBin: true peerDependencies: markdown-it-mathjax3: ^4 @@ -9524,7 +9525,7 @@ snapshots: optionalDependencies: vite: 6.3.5(@types/node@24.0.13)(jiti@2.4.2)(lightningcss@1.30.1) - vitepress@1.6.3(@algolia/client-search@5.34.1)(@types/node@24.0.13)(axios@1.10.0)(lightningcss@1.30.1)(postcss@8.5.6)(search-insights@2.17.3)(typescript@5.8.3): + vitepress@1.6.4(@algolia/client-search@5.34.1)(@types/node@24.0.13)(axios@1.10.0)(lightningcss@1.30.1)(postcss@8.5.6)(search-insights@2.17.3)(typescript@5.8.3): dependencies: '@docsearch/css': 3.8.2 '@docsearch/js': 3.8.2(@algolia/client-search@5.34.1)(search-insights@2.17.3)