Skip to content

Commit

Permalink
Merge pull request #188 from frankhereford/rebuild-with-improved-typing
Browse files Browse the repository at this point in the history
Rebuild with improved typing
  • Loading branch information
frankhereford authored Nov 23, 2022
2 parents 9e3286d + 0b3d0f1 commit 32e2158
Show file tree
Hide file tree
Showing 77 changed files with 6,608 additions and 3,966 deletions.
20 changes: 20 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Since .env is gitignored, you can use .env.example to build a new `.env` file when you clone the repo.
# Keep this file up-to-date when you add new variables to `.env`.

# This file will be committed to version control, so make sure not to have any secrets in it.
# If you are cloning this repo, create a copy of this file named `.env` and populate it with your secrets.

# When adding additional env variables, the schema in /env/schema.mjs should be updated accordingly

# Prisma
DATABASE_URL=file:./db.sqlite

# Next Auth
# You can generate the secret via 'openssl rand -base64 32' on Linux
# More info: https://next-auth.js.org/configuration/options#secret
# NEXTAUTH_SECRET=
NEXTAUTH_URL=http://localhost:3000

# Next Auth Discord Provider
DISCORD_CLIENT_ID=
DISCORD_CLIENT_SECRET=
10 changes: 7 additions & 3 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@
"project": "./tsconfig.json"
},
"plugins": ["@typescript-eslint"],
"extends": ["next/core-web-vitals", "plugin:@typescript-eslint/recommended"],
"ignorePatterns": ["!.*", "dist", "node_modules"],
"extends": [
"next/core-web-vitals",
"plugin:@typescript-eslint/recommended",
"standard-with-typescript"
],
"rules": {
"@typescript-eslint/consistent-type-imports": "warn"
"@typescript-eslint/consistent-type-imports": "warn",
"@typescript-eslint/explicit-function-return-type": "off"
}
}
1 change: 0 additions & 1 deletion .github/linters/.eslintignore

This file was deleted.

71 changes: 0 additions & 71 deletions .github/linters/.eslintrc.yml

This file was deleted.

6 changes: 6 additions & 0 deletions .github/linters/.jscpd.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"threshold": 50,
"reporters": ["consoleFull"],
"ignore": ["**/__snapshots__/**"],
"absolute": true
}
13 changes: 11 additions & 2 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,24 @@
#################################
name: Lint Code Base

env:
FILTER_REGEX_EXCLUDE: "./prisma/migrations/*"
VALIDATE_TYPESCRIPT_STANDARD: false
#TYPESCRIPT_ES_CONFIG_FILE: "{{ $github.workspace }}/.eslintrc.json"
#TYPESCRIPT_STANDARD_TSCONFIG_FILE: "{{ $github.workspace }}/tsconfig.json"
#LINTER_RULES_PATH: "/"


#############################
# Start the job on all push #
#############################
on:
#push:
#branches-ignore: [main]
# Remove the line above to run when pushing to master
pull_request:
branches: [main]
# pull_request:
# branches: [main]
pull_request

###############
# Set the Job #
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/pr_deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,14 @@ jobs:
- name: Prepare and deploy feature branch
id: prepare-and-deploy
run: |
export
npm i -g @railway/cli
cd "$HOME"
mkdir .railway
cd .railway
echo "$RAILWAY_CONFIG" > config.json
cd "$GITHUB_WORKSPACE"
echo "👀 Check railway auth"
echo "👀 Check railway authentication"
railway whoami
RAILWAY_ENVIRONMENT="katamino-pr-${{ github.event.number }}"
echo "🚉 Railway Environment: $RAILWAY_ENVIRONMENT"
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/sanity-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---

name: Sanity check for WIP

on:
pull_request:
types:
- opened
- synchronize
- reopened
- edited
- labeled
- unlabeled

jobs:
pr_wip_check:
runs-on: ubuntu-latest
name: WIP Check
steps:
- name: WIP Check
uses: tim-actions/wip-check@master
with:
labels: '["do-not-merge", "wip", "rfc"]'
keywords: '["WIP", "wip", "RFC", "rfc"]'
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
# next.js
/.next/
/out/
next-env.d.ts

# production
/build
Expand Down
6 changes: 0 additions & 6 deletions .npmrc

This file was deleted.

15 changes: 0 additions & 15 deletions .vscode/launch.json

This file was deleted.

11 changes: 8 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{
"cSpell.words": [
"atamino",
"Authed",
"autoincrement",
"cmyk",
"colord",
"daisyui",
"datasource",
Expand All @@ -10,10 +12,12 @@
"marocchino",
"NEXTAUTH",
"norelease",
"ogin",
"penta",
"pentas",
"pjson",
"rymndhng",
"signin",
"signoff",
"subcomponents",
"superjson",
Expand All @@ -24,9 +28,10 @@
"usefavicon",
"VERCEL"
],
"editor.defaultFormatter": "rvest.vs-code-prettier-eslint",
"editor.formatOnPaste": false, // required
"editor.formatOnType": false, // required
// these feel a little prescriptive, they can be changed if needed
"editor.defaultFormatter": "rvest.vs-code-prettier-eslint",
"editor.formatOnPaste": true, // required
"editor.formatOnType": true, // required
"editor.formatOnSave": false, // optional
"editor.formatOnSaveMode": "file", // required to format on save
"files.autoSave": "onFocusChange" // optional but recommended
Expand Down
1 change: 0 additions & 1 deletion .yarnrc

This file was deleted.

24 changes: 0 additions & 24 deletions LICENSE

This file was deleted.

37 changes: 0 additions & 37 deletions example-.env

This file was deleted.

5 changes: 0 additions & 5 deletions next-env.d.ts

This file was deleted.

19 changes: 14 additions & 5 deletions next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,24 @@
* Run `build` or `dev` with `SKIP_ENV_VALIDATION` to skip env validation.
* This is especially useful for Docker builds.
*/
!process.env.SKIP_ENV_VALIDATION && (await import("./src/env/server.mjs"));
!process.env.SKIP_ENV_VALIDATION && (await import('./src/env/server.mjs'))

/** @type {import("next").NextConfig} */
const config = {
reactStrictMode: true,
swcMinify: true,
i18n: {
locales: ["en"],
defaultLocale: "en",
locales: ['en'],
defaultLocale: 'en'
},
};
export default config;
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 's.gravatar.com',
pathname: '/avatar/**'
}
]
}
}
export default config
Loading

0 comments on commit 32e2158

Please sign in to comment.