-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* docs: readme update * perf: move some packages to devdeps * chore: format * chore: add prettier to lint script * chore: add vscode settings * ci: add lighthouse and lint build workflows * ci: setup husky and lint staged * ci: add gh codeowners file * ci: setup commitlint
- Loading branch information
1 parent
6445ebf
commit 5f305bc
Showing
20 changed files
with
1,436 additions
and
79 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,5 @@ node_modules | |
.git | ||
.next | ||
.env | ||
.github | ||
.github | ||
.husky |
Validating CODEOWNERS rules …
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,2 @@ | ||
# Global rule: | ||
* @apotdevin @secondl1ght |
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,18 @@ | ||
name: Lighthouse audit | ||
|
||
on: [push] | ||
|
||
jobs: | ||
lighthouseci: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
- run: npm install && npm install -g @lhci/cli | ||
- run: npm run build | ||
- run: lhci collect | ||
- run: lhci upload | ||
env: | ||
LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }} |
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,61 @@ | ||
name: Lint and build check | ||
|
||
on: | ||
pull_request: | ||
types: [opened, reopened, synchronize] | ||
|
||
jobs: | ||
lint_build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Cache node modules | ||
id: cache-npm | ||
uses: actions/cache@v3 | ||
env: | ||
cache-name: cache-node-modules | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-build-${{ env.cache-name }}- | ||
${{ runner.os }}-build- | ||
${{ runner.os }}- | ||
- if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }} | ||
name: List the state of node modules | ||
continue-on-error: true | ||
run: npm list | ||
|
||
- name: Install modules | ||
run: npm install | ||
|
||
- name: Run lint | ||
run: npm run lint | ||
|
||
- name: Run build | ||
run: npm run build | ||
|
||
docker_build: | ||
if: github.head_ref != 'develop' | ||
needs: lint_build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Docker Buildx Driver | ||
id: docker_driver_setup | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Run docker build | ||
id: docker_build | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: ./ | ||
file: ./Dockerfile | ||
push: false | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max |
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 @@ | ||
npx --no -- commitlint --edit $1 |
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 @@ | ||
npm run lint-staged |
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,20 @@ | ||
{ | ||
"ci": { | ||
"collect": { | ||
"startServerCommand": "npm run start", | ||
"startServerReadyPattern": "ready on", | ||
"url": ["http://localhost:3000/"], | ||
"numberOfRuns": 1, | ||
"settings": { | ||
"preset": "desktop" | ||
} | ||
}, | ||
"assert": { | ||
"preset": "lighthouse:recommended" | ||
}, | ||
"upload": { | ||
"target": "temporary-public-storage" | ||
}, | ||
"server": {} | ||
} | ||
} |
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,10 @@ | ||
const path = require('path'); | ||
|
||
const buildEslintCommand = filenames => | ||
`next lint --fix --file ${filenames | ||
.map(f => path.relative(process.cwd(), f)) | ||
.join(' --file ')}`; | ||
|
||
module.exports = { | ||
'*.{js,jsx,ts,tsx}': [buildEslintCommand], | ||
}; |
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 @@ | ||
{ | ||
"editor.quickSuggestions": { | ||
"strings": "on" | ||
}, | ||
"files.associations": { | ||
"*.css": "tailwindcss" | ||
}, | ||
"editor.formatOnSave": 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
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 @@ | ||
module.exports = { extends: ['@commitlint/config-conventional'] }; |
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 |
---|---|---|
|
@@ -14,4 +14,4 @@ | |
"components": "@/components", | ||
"utils": "@/lib/utils" | ||
} | ||
} | ||
} |
Oops, something went wrong.