Skip to content

Commit

Permalink
Linter and formater
Browse files Browse the repository at this point in the history
  • Loading branch information
Hacksore committed Nov 23, 2023
1 parent d33e3d7 commit 9d40720
Show file tree
Hide file tree
Showing 18 changed files with 141 additions and 1,030 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ jobs:
APPLE_SIGNING_IDENTITY: "${{ secrets.APPLE_SIGNING_IDENTITY }}"
APPLE_CERTIFICATE: "${{ secrets.APPLE_CERTIFICATE }}"
APPLE_CERTIFICATE_PASSWORD: "${{ secrets.APPLE_CERTIFICATE_PASSWORD }}"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAURI_PRIVATE_KEY: "${{ secrets.TAURI_PRIVATE_KEY }}"
TAURI_PUBLIC_KEY: "${{ secrets.TAURI_PUBLIC_KEY }}"
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
with:
projectPath: "${{ env.APP_DIR }}"
releaseId: ${{ needs.create-release.outputs.release_id }}
Expand Down
10 changes: 10 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"trailingComma": "es5",
"tabWidth": 2,
"semi": true,
"printWidth": 120,
"singleQuote": false,
"quoteProps": "as-needed",
"arrowParens": "avoid",
"endOfLine": "auto"
}
16 changes: 16 additions & 0 deletions apps/desktop/.eslint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"extends": [
"plugin:react/recommended",
"plugin:react/jsx-runtime",
"custom"
],
"plugins": [
"import",
"react"
],
"settings": {
"react": {
"version": "detect"
}
}
}
3 changes: 3 additions & 0 deletions apps/desktop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
"start": "tauri dev",
"dev": "vite",
"build": "tsc && vite build",
"lint": "eslint . --ext .js,.jsx,.ts,.tsx",
"format": "prettier --write .",
"build:tauri": "tauri build",
"preview": "vite preview",
"tauri": "tauri"
Expand All @@ -28,6 +30,7 @@
"zustand": "^4.4.5"
},
"devDependencies": {
"eslint-config-custom": "*",
"@tauri-apps/cli": "^1.5.0",
"@types/react": "^18.2.15",
"@types/react-dom": "^18.2.7",
Expand Down
16 changes: 16 additions & 0 deletions apps/updater/.eslint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"extends": [
"plugin:react/recommended",
"plugin:react/jsx-runtime",
"custom"
],
"plugins": [
"import",
"react"
],
"settings": {
"react": {
"version": "detect"
}
}
}
6 changes: 0 additions & 6 deletions apps/updater/.prettierrc

This file was deleted.

6 changes: 6 additions & 0 deletions apps/updater/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,17 @@
"private": true,
"scripts": {
"deploy": "wrangler deploy",
"lint": "eslint . --ext .js,.jsx,.ts,.tsx",
"format": "prettier --write .",
"start": "wrangler dev"
},
"devDependencies": {
"eslint-config-custom": "*",
"@cloudflare/workers-types": "^4.20230419.0",
"typescript": "^5.0.4",
"wrangler": "^3.0.0"
},
"dependencies": {
"hono": "^3.10.2"
}
}
53 changes: 23 additions & 30 deletions apps/updater/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,32 +1,25 @@
/**
* Welcome to Cloudflare Workers! This is your first worker.
*
* - Run `npm run dev` in your terminal to start a development server
* - Open a browser tab at http://localhost:8787/ to see your worker in action
* - Run `npm run deploy` to publish your worker
*
* Learn more at https://developers.cloudflare.com/workers/
*/
import { Hono } from "hono/quick";

export interface Env {
// Example binding to KV. Learn more at https://developers.cloudflare.com/workers/runtime-apis/kv/
// MY_KV_NAMESPACE: KVNamespace;
//
// Example binding to Durable Object. Learn more at https://developers.cloudflare.com/workers/runtime-apis/durable-objects/
// MY_DURABLE_OBJECT: DurableObjectNamespace;
//
// Example binding to R2. Learn more at https://developers.cloudflare.com/workers/runtime-apis/r2/
// MY_BUCKET: R2Bucket;
//
// Example binding to a Service. Learn more at https://developers.cloudflare.com/workers/runtime-apis/service-bindings/
// MY_SERVICE: Fetcher;
//
// Example binding to a Queue. Learn more at https://developers.cloudflare.com/queues/javascript-apis/
// MY_QUEUE: Queue;
}
type Bindings = {};

export default {
async fetch(request: Request, env: Env, ctx: ExecutionContext): Promise<Response> {
return new Response('Hello World!');
},
};
const app = new Hono<{ Bindings: Bindings }>();

app.get("/:target/:arch/:currentVersion", async c => {
const target = c.req.param("target");
const arch = c.req.param("arch");
const currentVersion = c.req.param("currentVersion");

return c.body(
JSON.stringify({
target,
arch,
currentVersion,
}),
200,
{
"Content-Type": "application/json",
}
);
});

export default app;
16 changes: 16 additions & 0 deletions apps/web/.eslint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"extends": [
"plugin:react/recommended",
"plugin:react/jsx-runtime",
"custom"
],
"plugins": [
"import",
"react"
],
"settings": {
"react": {
"version": "detect"
}
}
}
3 changes: 3 additions & 0 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
"scripts": {
"start": "astro dev",
"build": "astro build",
"lint": "eslint --ext .astro,.js,.jsx,.mjs,.ts,.tsx .",
"format": "prettier --write .",
"preview": "astro preview",
"astro": "astro"
},
Expand All @@ -14,6 +16,7 @@
"tailwindcss": "^3.3.5"
},
"devDependencies": {
"eslint-config-custom": "*",
"prettier": "^3.0.3",
"prettier-plugin-astro": "^0.12.1",
"prettier-plugin-tailwindcss": "^0.5.6"
Expand Down
3 changes: 0 additions & 3 deletions packages/ui/.eslintrc.js

This file was deleted.

27 changes: 0 additions & 27 deletions packages/ui/card.tsx

This file was deleted.

2 changes: 0 additions & 2 deletions packages/ui/index.tsx

This file was deleted.

21 changes: 0 additions & 21 deletions packages/ui/package.json

This file was deleted.

5 changes: 0 additions & 5 deletions packages/ui/tsconfig.json

This file was deleted.

31 changes: 0 additions & 31 deletions packages/ui/turbo/generators/config.ts

This file was deleted.

14 changes: 0 additions & 14 deletions packages/ui/turbo/generators/templates/component.hbs

This file was deleted.

Loading

0 comments on commit 9d40720

Please sign in to comment.