Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@
# When adding additional environment variables, the schema in "/src/env.js"
# should be updated accordingly.

# App
# Use the production URL when deploying to production
NEXT_PUBLIC_APP_URL="http://localhost:3000"

# uploadthing
UPLOADTHING_TOKEN=""

Expand Down
55 changes: 0 additions & 55 deletions .eslintrc.cjs

This file was deleted.

16 changes: 16 additions & 0 deletions .github/setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Setup Workflow
description: Composite action that sets up pnpm and installs dependencies
runs:
using: "composite"
steps:
- uses: actions/setup-node@v4
with:
node-version: 20.x

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10.8.0

- run: pnpm install
shell: bash
131 changes: 32 additions & 99 deletions .github/workflows/code-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,119 +6,52 @@ on:
push:
branches: ["main"]

jobs:
lint:
runs-on: ubuntu-latest
name: Lint
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

- uses: pnpm/[email protected]
name: Install pnpm
id: pnpm-install
with:
version: 8.6.1
run_install: false

- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install

- run: cp .env.example .env.local

- run: pnpm lint
env:
FORCE_COLOR: 3

jobs:
format:
runs-on: ubuntu-latest
name: Format
steps:
- uses: actions/checkout@v4
- name: Checkout repo
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
fetch-depth: 0
version: 10.8.0
- uses: ./.github/setup

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Check formatting
run: pnpm lint:fix

- uses: pnpm/[email protected]
name: Install pnpm
id: pnpm-install
with:
version: 8.6.1
run_install: false

- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT

- uses: actions/cache@v4
name: Setup pnpm cache
lint:
runs-on: ubuntu-latest
name: Lint
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Install dependencies
run: pnpm install

- run: cp .env.example .env.local
version: 10.8.0
- uses: ./.github/setup

- run: pnpm format:check
- run: pnpm lint

tsc:
typecheck:
runs-on: ubuntu-latest
name: Typecheck
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20

- uses: pnpm/[email protected]
name: Install pnpm
id: pnpm-install
with:
version: 8.6.1
run_install: false

- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v4
name: Setup pnpm cache
- name: Checkout repo
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install

- run: cp .env.example .env.local
version: 10.8.0
- uses: ./.github/setup

- run: pnpm typecheck
87 changes: 87 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
{
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
"organizeImports": {
"enabled": true
},
"formatter": {
"enabled": true,
"indentWidth": 2,
"indentStyle": "space",
"ignore": [
"**/node_modules",
"**/dist",
"**/build",
"**/public",
"**/.turbo",
"**/.next"
]
},
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"a11y": {
"noSvgWithoutTitle": "off",
"useButtonType": "off",
"useAltText": "off",
"useKeyWithClickEvents": "off",
"useSemanticElements": "off",
"noLabelWithoutControl": "off"
},
"correctness": {
"noUnusedVariables": "warn",
"useExhaustiveDependencies": "warn"
},
"complexity": {
"noBannedTypes": "off"
},
"style": {
"useImportType": "warn"
},
"security": {
"noDangerouslySetInnerHtml": "off"
},
"suspicious": {
"noAssignInExpressions": "off",
"noArrayIndexKey": "off"
},
"nursery": {
"useSortedClasses": {
"level": "warn",
"options": {
"attributes": ["classList"],
"functions": ["clsx", "cva", "tw"]
}
}
}
},
"ignore": [
"**/node_modules",
"**/dist",
"**/build",
"**/public",
"**/.turbo",
"**/.next"
]
},
"overrides": [
{
"include": ["**/*.test.ts"]
}
],
"vcs": {
"enabled": true,
"clientKind": "git",
"useIgnoreFile": true
},
"files": {
"ignore": [
"**/node_modules",
"**/dist",
"**/build",
"**/public",
"**/.turbo",
"**/.next"
]
}
}
11 changes: 7 additions & 4 deletions next.config.js → next.config.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import type { NextConfig } from "next";

/**
* Run `build` or `dev` with `SKIP_ENV_VALIDATION` to skip env validation. This is especially useful
* for Docker builds.
*/
// Import environment validation synchronously
import "./src/env.js";

/** @type {import("next").NextConfig} */
const config = {
const nextConfig: NextConfig = {
images: {
remotePatterns: [
{
Expand All @@ -17,6 +20,6 @@ const config = {
// Already doing linting and typechecking as separate tasks in CI
eslint: { ignoreDuringBuilds: true },
typescript: { ignoreBuildErrors: true },
}
};

export default config
export default nextConfig;
Loading