Skip to content

Commit

Permalink
fix: format all files
Browse files Browse the repository at this point in the history
  • Loading branch information
FleetAdmiralJakob committed Feb 3, 2025
1 parent 7810e31 commit 1b34f36
Show file tree
Hide file tree
Showing 21 changed files with 208 additions and 203 deletions.
59 changes: 33 additions & 26 deletions apps/web/next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,43 +1,50 @@
import createJiti from 'jiti'
import {fileURLToPath} from 'node:url'
import withBundleAnalyzer from '@next/bundle-analyzer'
import withPWAInit from '@ducanh2912/next-pwa'
import {withAxiomNextConfig} from 'next-axiom'
import { fileURLToPath } from "node:url";
import withPWAInit from "@ducanh2912/next-pwa";
import withBundleAnalyzer from "@next/bundle-analyzer";
import createJiti from "jiti";
import { withAxiomNextConfig } from "next-axiom";

const withPWA = withPWAInit({
dest: 'public',
dest: "public",
fallbacks: {
document: '/_offline'
}
})
document: "/_offline",
},
});

// create the bundle analyzer config
const withMyBundleAnalyzer = withBundleAnalyzer({
enabled: process.env.ANALYZE === 'true'
})
enabled: process.env.ANALYZE === "true",
});

const jiti = createJiti(fileURLToPath(import.meta.url))
const jiti = createJiti(fileURLToPath(import.meta.url));

/**
* Run `build` or `dev` with `SKIP_ENV_VALIDATION` to skip env validation. This is especially useful
* for Docker builds.
* Importing env files here to validate on build
*/
jiti('./src/env.ts')
jiti('@weatherio/api/env')
jiti("./src/env.ts");
jiti("@weatherio/api/env");

/** @type {import("next").NextConfig} */
const config = withMyBundleAnalyzer(withPWA(
withAxiomNextConfig({
reactStrictMode: true,
const config = withMyBundleAnalyzer(
withPWA(
withAxiomNextConfig({
reactStrictMode: true,

/** Enables hot reloading for local packages without a build step */
transpilePackages: ['@weatherio/api', '@weatherio/ui', '@weatherio/types', '@weatherio/city-data'],
i18n: {
defaultLocale: 'en',
locales: ['en', 'de', 'id']
}
}))
)
/** Enables hot reloading for local packages without a build step */
transpilePackages: [
"@weatherio/api",
"@weatherio/ui",
"@weatherio/types",
"@weatherio/city-data",
],
i18n: {
defaultLocale: "en",
locales: ["en", "de", "id"],
},
}),
),
);

export default config
export default config;
6 changes: 3 additions & 3 deletions apps/web/postcss.config.cjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {}
}
}
autoprefixer: {},
},
};
8 changes: 4 additions & 4 deletions apps/web/public/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
"icons": [
{
"src": "/icons/icon-512x-512-any.png",
"sizes": "512x512",
"type": "image/png",
"purpose": "any maskable"
"sizes": "512x512",
"type": "image/png",
"purpose": "any maskable"
}
]
}
}
2 changes: 1 addition & 1 deletion apps/web/src/pages/settings/settings.module.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.normalbutton {
@apply mt-3 flex h-10 w-64 md:w-96 items-center border-gray-700 bg-[#d8d5db] md:text-base text-sm whitespace-nowrap pr-2 pl-2;
@apply mt-3 flex h-10 w-64 items-center whitespace-nowrap border-gray-700 bg-[#d8d5db] pl-2 pr-2 text-sm md:w-96 md:text-base;
}

.buttontext {
Expand Down
124 changes: 62 additions & 62 deletions apps/web/src/styles/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,89 +3,89 @@
@tailwind utilities;

@layer base {
:root {
--background: 0 0% 100%;
--foreground: 222.2 84% 4.9%;
:root {
--background: 0 0% 100%;
--foreground: 222.2 84% 4.9%;

--card: 0 0% 100%;
--card-foreground: 222.2 84% 4.9%;
--card: 0 0% 100%;
--card-foreground: 222.2 84% 4.9%;

--popover: 0 0% 100%;
--popover-foreground: 222.2 84% 4.9%;
--popover: 0 0% 100%;
--popover-foreground: 222.2 84% 4.9%;

--primary: 222.2 47.4% 11.2%;
--primary-foreground: 210 40% 98%;
--primary: 222.2 47.4% 11.2%;
--primary-foreground: 210 40% 98%;

--secondary: 210 40% 96.1%;
--secondary-foreground: 222.2 47.4% 11.2%;
--secondary: 210 40% 96.1%;
--secondary-foreground: 222.2 47.4% 11.2%;

--muted: 210 40% 96.1%;
--muted-foreground: 215.4 16.3% 46.9%;
--muted: 210 40% 96.1%;
--muted-foreground: 215.4 16.3% 46.9%;

--accent: 210 40% 96.1%;
--accent-foreground: 222.2 47.4% 11.2%;
--accent: 210 40% 96.1%;
--accent-foreground: 222.2 47.4% 11.2%;

--destructive: 0 84.2% 60.2%;
--destructive-foreground: 210 40% 98%;
--destructive: 0 84.2% 60.2%;
--destructive-foreground: 210 40% 98%;

--border: 214.3 31.8% 91.4%;
--input: 214.3 31.8% 91.4%;
--ring: 222.2 84% 4.9%;
--border: 214.3 31.8% 91.4%;
--input: 214.3 31.8% 91.4%;
--ring: 222.2 84% 4.9%;

--radius: 0.5rem;
}
--radius: 0.5rem;
}

.dark {
--background: 222.2 84% 4.9%;
--foreground: 210 40% 98%;
.dark {
--background: 222.2 84% 4.9%;
--foreground: 210 40% 98%;

--card: 222.2 84% 4.9%;
--card-foreground: 210 40% 98%;
--card: 222.2 84% 4.9%;
--card-foreground: 210 40% 98%;

--popover: 222.2 84% 4.9%;
--popover-foreground: 210 40% 98%;
--popover: 222.2 84% 4.9%;
--popover-foreground: 210 40% 98%;

--primary: 210 40% 98%;
--primary-foreground: 222.2 47.4% 11.2%;
--primary: 210 40% 98%;
--primary-foreground: 222.2 47.4% 11.2%;

--secondary: 217.2 32.6% 17.5%;
--secondary-foreground: 210 40% 98%;
--secondary: 217.2 32.6% 17.5%;
--secondary-foreground: 210 40% 98%;

--muted: 217.2 32.6% 17.5%;
--muted-foreground: 215 20.2% 65.1%;
--muted: 217.2 32.6% 17.5%;
--muted-foreground: 215 20.2% 65.1%;

--accent: 217.2 32.6% 17.5%;
--accent-foreground: 210 40% 98%;
--accent: 217.2 32.6% 17.5%;
--accent-foreground: 210 40% 98%;

--destructive: 0 62.8% 30.6%;
--destructive-foreground: 210 40% 98%;
--destructive: 0 62.8% 30.6%;
--destructive-foreground: 210 40% 98%;

--border: 217.2 32.6% 17.5%;
--input: 217.2 32.6% 17.5%;
--ring: 212.7 26.8% 83.9%;
}
--border: 217.2 32.6% 17.5%;
--input: 217.2 32.6% 17.5%;
--ring: 212.7 26.8% 83.9%;
}
}

@layer base {
* {
@apply border-border;
}
body {
@apply bg-background text-foreground;
}
* {
@apply border-border;
}
body {
@apply bg-background text-foreground;
}
}

.fade-effect::after {
content: "";
position: absolute;
top: 0;
right: 0;
bottom: 0.8rem;
width: 80px;
background: linear-gradient(
to right,
rgba(255, 255, 255, 0),
rgb(156, 163, 175) 100%
);
pointer-events: none;
}
content: "";
position: absolute;
top: 0;
right: 0;
bottom: 0.8rem;
width: 80px;
background: linear-gradient(
to right,
rgba(255, 255, 255, 0),
rgb(156, 163, 175) 100%
);
pointer-events: none;
}
22 changes: 5 additions & 17 deletions apps/web/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,18 @@
"compilerOptions": {
"baseUrl": ".",
"paths": {
"~/*": [
"./src/*"
],
"@weatherio/api": [
"node_modules/@weatherio/api/*"
],
"~/*": ["./src/*"],
"@weatherio/api": ["node_modules/@weatherio/api/*"]
},
"plugins": [
{
"name": "next"
}
],
"tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json",
"types": [
"@ducanh2912/next-pwa/workbox"
],
"types": ["@ducanh2912/next-pwa/workbox"],
"strictNullChecks": true
},
"include": [
".",
".next/types/**/*.ts",
"../../reset.d.ts"
],
"exclude": [
"node_modules"
]
"include": [".", ".next/types/**/*.ts", "../../reset.d.ts"],
"exclude": ["node_modules"]
}
21 changes: 12 additions & 9 deletions packages/api/env.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { createEnv } from '@t3-oss/env-nextjs'
import { z } from 'zod'
import { createEnv } from "@t3-oss/env-nextjs";
import { z } from "zod";

export const env = createEnv({
server: {
NODE_ENV: z.enum(['development', 'test', 'production']),
NODE_ENV: z.enum(["development", "test", "production"]),
OPEN_WEATHER_API_KEY: z.string().min(1),
UPSTASH_REDIS_REST_URL: z.string().min(1).url(),
UPSTASH_REDIS_REST_TOKEN: z.string().min(1),
Expand All @@ -20,12 +20,15 @@ export const env = createEnv({
OPEN_WEATHER_API_KEY: process.env.OPEN_WEATHER_API_KEY,
UPSTASH_REDIS_REST_URL: process.env.UPSTASH_REDIS_REST_URL,
UPSTASH_REDIS_REST_TOKEN: process.env.UPSTASH_REDIS_REST_TOKEN,
UPSTASH_RATELIMITER_TOKENS_PER_TIME: process.env.UPSTASH_RATELIMITER_TOKENS_PER_TIME,
UPSTASH_RATELIMITER_TIME_INTERVAL: process.env.UPSTASH_RATELIMITER_TIME_INTERVAL,
UPSTASH_RATELIMITER_EXCLUDED_IPS: process.env.UPSTASH_RATELIMITER_EXCLUDED_IPS,
UPSTASH_RATELIMITER_TOKENS_PER_TIME:
process.env.UPSTASH_RATELIMITER_TOKENS_PER_TIME,
UPSTASH_RATELIMITER_TIME_INTERVAL:
process.env.UPSTASH_RATELIMITER_TIME_INTERVAL,
UPSTASH_RATELIMITER_EXCLUDED_IPS:
process.env.UPSTASH_RATELIMITER_EXCLUDED_IPS,
RESEND_API_KEY: process.env.RESEND_API_KEY,
QWEATHER_API_KEY: process.env.QWEATHER_API_KEY,
API_NINJA_API_KEY: process.env.API_NINJA_API_KEY
API_NINJA_API_KEY: process.env.API_NINJA_API_KEY,
},
skipValidation: !!process.env.CI || !!process.env.SKIP_ENV_VALIDATION
})
skipValidation: !!process.env.CI || !!process.env.SKIP_ENV_VALIDATION,
});
2 changes: 1 addition & 1 deletion packages/api/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
"compilerOptions": {
"tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json"
},
"include": ["src", "../../reset.d.ts", "**/*.mjs", "."],
"include": ["src", "../../reset.d.ts", "**/*.mjs", "."],
"exclude": ["node_modules"]
}
2 changes: 1 addition & 1 deletion packages/city-data/.prettierignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
'convex/_generated'
convex/_generated
2 changes: 1 addition & 1 deletion packages/city-data/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"scripts": {
"dev": "convex dev",
"clean": "rm -rf .turbo node_modules",
"format": "prettier --check . --ignore-path ../../.gitignore",
"format": "prettier --check . --ignore-path ../../.gitignore --ignore-path ./.gitignore --ignore-path ./.prettierignore --ignore-path ./src/.gitignore",
"lint": "eslint .",
"typecheck": "tsc --noEmit",
"update:city-data-dev": "cd src && cross-env DEV_MODE=true tsx download.ts && cross-env DEV_MODE=true tsx convert.ts && cross-env DEV_MODE=true tsx optimize-json.ts && cd .. && convex import --table search src/cities.jsonl --replace",
Expand Down
9 changes: 8 additions & 1 deletion packages/e2e-web-tests/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@
"@weatherio/*": ["node_modules/@weatherio/*"]
}
},
"include": ["tests", "**/*.mjs", "../../reset.d.ts", "**/*.ts", "**/*.tsx", "playwright.config.ts"],
"include": [
"tests",
"**/*.mjs",
"../../reset.d.ts",
"**/*.ts",
"**/*.tsx",
"playwright.config.ts"
],
"exclude": ["node_modules"]
}
2 changes: 1 addition & 1 deletion packages/types/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
"compilerOptions": {
"tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json"
},
"include": ["src", "../../reset.d.ts"],
"include": ["src", "../../reset.d.ts"],
"exclude": ["node_modules"]
}
10 changes: 5 additions & 5 deletions packages/ui/src/collapsible.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import * as CollapsiblePrimitive from "@radix-ui/react-collapsible"
import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";

const Collapsible = CollapsiblePrimitive.Root
const Collapsible = CollapsiblePrimitive.Root;

const CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger
const CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger;

const CollapsibleContent = CollapsiblePrimitive.CollapsibleContent
const CollapsibleContent = CollapsiblePrimitive.CollapsibleContent;

export { Collapsible, CollapsibleTrigger, CollapsibleContent }
export { Collapsible, CollapsibleTrigger, CollapsibleContent };
Loading

0 comments on commit 1b34f36

Please sign in to comment.