-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
migrated to turborepo, tsup & next.js
- Loading branch information
Showing
65 changed files
with
7,047 additions
and
35,911 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,10 @@ | ||
// This configuration only applies to the package manager root. | ||
/** @type {import("eslint").Linter.Config} */ | ||
module.exports = { | ||
env: { | ||
browser: true, | ||
es6: true, | ||
}, | ||
extends: ['react-app', 'plugin:react/recommended', 'airbnb', 'prettier'], | ||
ignorePatterns: ['apps/**', 'packages/**'], | ||
extends: ['@repo/eslint-config/library.js'], | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
ecmaFeatures: { | ||
jsx: true, | ||
}, | ||
ecmaVersion: 12, | ||
sourceType: 'module', | ||
}, | ||
plugins: ['react', '@typescript-eslint', 'prettier'], | ||
settings: { | ||
'import/resolver': { | ||
node: { | ||
extensions: ['.js', '.jsx', '.ts', '.tsx'], | ||
}, | ||
}, | ||
}, | ||
rules: { | ||
'prettier/prettier': 'warn', | ||
'no-shadow': 'warn', | ||
'no-unused-vars': 'off', | ||
"prefer-destructuring": "warn", | ||
'@typescript-eslint/no-unused-vars': 'warn', | ||
// For optional chaining to not create linting errors | ||
'no-unused-expressions': 'off', | ||
"no-plusplus": "off", | ||
"operator-assignment": "warn", | ||
"object-shorthand": "warn", | ||
'arrow-body-style': 'off', | ||
"radix": "off", | ||
'import/extensions': 'off', | ||
'import/no-extraneous-dependencies': 'off', | ||
'import/order': 'off', | ||
'import/newline-after-import': 'warn', | ||
'no-use-before-define': 'off', | ||
"@typescript-eslint/no-explicit-any": "warn", | ||
'@typescript-eslint/no-use-before-define': 'warn', | ||
'react/jsx-curly-newline': 'off', | ||
'react/jsx-tag-spacing': 'warn', | ||
'react/button-has-type': 'warn', | ||
"react/jsx-fragments": "warn", | ||
'react/jsx-filename-extension': [ | ||
'warn', | ||
{ extensions: ['.js', '.jsx', '.ts', '.tsx'] }, | ||
], | ||
project: true, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: Install | ||
description: Sets up Node.js and runs install | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: npm | ||
|
||
- name: Install dependencies | ||
shell: bash | ||
run: npm ci |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
name: Quality | ||
|
||
on: | ||
push: | ||
branches: | ||
# TODO: This will be replaced with `main` later. | ||
- monorepo | ||
|
||
# To cancel previous workflow when a new one is triggered. | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
format: | ||
name: Format | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install | ||
uses: ./.github/composite-actions/install | ||
|
||
- name: Run format check | ||
run: npm run format | ||
|
||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install | ||
uses: ./.github/composite-actions/install | ||
|
||
- name: Run lint check | ||
run: npm run lint | ||
|
||
typecheck: | ||
name: Typecheck | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install | ||
uses: ./.github/composite-actions/install | ||
|
||
- name: Run type check | ||
run: npm run typecheck | ||
|
||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install | ||
uses: ./.github/composite-actions/install | ||
|
||
- name: Run build | ||
run: npm run build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,38 @@ | ||
*.log | ||
.DS_Store | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# Dependencies | ||
node_modules | ||
.cache | ||
.pnp | ||
.pnp.js | ||
|
||
# Local env files | ||
.env | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
# Testing | ||
coverage | ||
|
||
# Turbo | ||
.turbo | ||
|
||
# Vercel | ||
.vercel | ||
|
||
# Build Outputs | ||
.next/ | ||
out/ | ||
build | ||
dist | ||
|
||
|
||
# Debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# Misc | ||
.DS_Store | ||
*.pem |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,2 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
npx tsdx lint | ||
npx lint-staged | ||
npm run typecheck |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/** @type {import("eslint").Linter.Config} */ | ||
module.exports = { | ||
root: true, | ||
extends: ['@repo/eslint-config/next.js', '@repo/eslint-config/typescript.js'], | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
project: true, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). | ||
|
||
## Getting Started | ||
|
||
First, run the development server: | ||
|
||
```bash | ||
npm run dev | ||
# or | ||
yarn dev | ||
# or | ||
pnpm dev | ||
# or | ||
bun dev | ||
``` | ||
|
||
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. | ||
|
||
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. | ||
|
||
This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font. | ||
|
||
## Learn More | ||
|
||
To learn more about Next.js, take a look at the following resources: | ||
|
||
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. | ||
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. | ||
|
||
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! | ||
|
||
## Deploy on Vercel | ||
|
||
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. | ||
|
||
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/// <reference types="next" /> | ||
/// <reference types="next/image-types/global" /> | ||
|
||
// NOTE: This file should not be edited | ||
// see https://nextjs.org/docs/basic-features/typescript for more information. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/** @type {import('next').NextConfig} */ | ||
const nextConfig = { | ||
output: 'export', | ||
images: { | ||
unoptimized: true, | ||
}, | ||
}; | ||
|
||
export default nextConfig; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"name": "demo", | ||
"version": "0.1.0", | ||
"private": true, | ||
"scripts": { | ||
"build": "next build", | ||
"dev": "next dev", | ||
"lint": "next lint --max-warnings 0", | ||
"lint:fix": "next lint --fix --max-warnings 0", | ||
"start": "next start", | ||
"typecheck": "tsc" | ||
}, | ||
"dependencies": { | ||
"next": "14.1.4", | ||
"react": "^18", | ||
"react-dom": "^18", | ||
"react-infinite-scroll-hook": "*" | ||
}, | ||
"devDependencies": { | ||
"@repo/eslint-config": "*", | ||
"@repo/typescript-config": "*", | ||
"@types/node": "^20", | ||
"@types/react": "^18", | ||
"@types/react-dom": "^18", | ||
"autoprefixer": "^10.4.19", | ||
"eslint": "^8", | ||
"eslint-config-next": "14.1.4", | ||
"postcss": "^8", | ||
"tailwindcss": "^3.4.3", | ||
"typescript": "^5" | ||
} | ||
} |
Oops, something went wrong.