-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: add workflow file for action to check types, lint, format
- Loading branch information
1 parent
a078e90
commit 7e28abd
Showing
25 changed files
with
1,049 additions
and
435 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 |
---|---|---|
@@ -0,0 +1,68 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
check-frontend: | ||
name: Format, Lint, Types (Frontend) | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- uses: pnpm/action-setup@v4 | ||
with: | ||
version: 8 | ||
|
||
- name: Install deps | ||
run: pnpm i | ||
working-directory: ./frontend | ||
|
||
- name: Check Format | ||
run: pnpm format:check | ||
working-directory: ./frontend | ||
|
||
- name: Check Lint | ||
run: pnpm lint | ||
working-directory: ./frontend | ||
|
||
- name: Check Types | ||
run: pnpm types | ||
working-directory: ./frontend | ||
|
||
check-backend: | ||
name: Format, Lint, Types (Backend) | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- uses: pnpm/action-setup@v4 | ||
with: | ||
version: 8 | ||
|
||
- name: Install deps | ||
run: pnpm i | ||
working-directory: ./backend | ||
|
||
- name: Check Format | ||
run: pnpm format:check | ||
working-directory: ./backend | ||
|
||
- name: Check Lint | ||
run: pnpm lint | ||
working-directory: ./backend | ||
|
||
- name: Check Types | ||
run: pnpm types | ||
working-directory: ./backend |
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,5 @@ | ||
name: update backend deployment | ||
|
||
on: | ||
push: | ||
branches: | ||
|
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
Empty file.
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,4 @@ | ||
{ | ||
"singleQuote": true, | ||
"trailingComma": "all" | ||
} |
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 @@ | ||
import globals from 'globals'; | ||
import pluginJs from '@eslint/js'; | ||
import tseslint from 'typescript-eslint'; | ||
import pluginReactConfig from 'eslint-plugin-react/configs/recommended.js'; | ||
import unusedImports from 'eslint-plugin-unused-imports'; | ||
|
||
export default [ | ||
{ | ||
plugins: { | ||
'unused-imports': unusedImports, | ||
}, | ||
rules: { | ||
'@typescript-eslint/no-unused-vars': 'off', | ||
'unused-imports/no-unused-imports': 'error', | ||
'unused-imports/no-unused-vars': [ | ||
'warn', | ||
{ | ||
vars: 'all', | ||
varsIgnorePattern: '^_', | ||
args: 'after-used', | ||
argsIgnorePattern: '^_', | ||
}, | ||
], | ||
}, | ||
}, | ||
{ files: ['**/*.{js,mjs,cjs,ts,jsx,tsx}'] }, | ||
{ languageOptions: { parserOptions: { ecmaFeatures: { jsx: true } } } }, | ||
{ languageOptions: { globals: { ...globals.browser, ...globals.node } } }, | ||
pluginJs.configs.recommended, | ||
...tseslint.configs.recommended, | ||
pluginReactConfig, | ||
]; |
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 |
---|---|---|
|
@@ -10,7 +10,10 @@ | |
"android": "expo run:android", | ||
"ios": "expo run:ios", | ||
"web": "expo start --web", | ||
"types": "pnpm tsc" | ||
"types": "pnpm tsc", | ||
"format": "prettier -w \"src/**/*.ts\"", | ||
"format:check": "prettier -c \"src/**/*.ts\"", | ||
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\"" | ||
}, | ||
"dependencies": { | ||
"@expo/metro-runtime": "~3.2.1", | ||
|
@@ -46,13 +49,21 @@ | |
"devDependencies": { | ||
"@babel/core": "^7.24.4", | ||
"@babel/plugin-transform-class-static-block": "^7.24.4", | ||
"@eslint/eslintrc": "^3.1.0", | ||
"@eslint/js": "^9.6.0", | ||
"@tanstack/eslint-plugin-query": "^5.28.11", | ||
"@tsconfig/react-native": "^3.0.5", | ||
"@types/jest": "^29.5.12", | ||
"@types/react": "18.2.79", | ||
"@types/react-test-renderer": "^18.3.0", | ||
"eslint": "^8.57.0", | ||
"eslint-plugin-react": "^7.34.3", | ||
"eslint-plugin-unused-imports": "^4.0.0", | ||
"globals": "^15.7.0", | ||
"prettier": "^3.3.2", | ||
"tailwindcss": "3.3.2", | ||
"typescript": "5.3.3" | ||
"typescript": "5.3.3", | ||
"typescript-eslint": "^7.14.1" | ||
}, | ||
"private": true, | ||
"packageManager": "[email protected]+sha1.a58c038faac410c947dbdb93eb30994037d0fce2" | ||
|
Oops, something went wrong.