-
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.
Browse files
Browse the repository at this point in the history
…orkflows #19 Github Workflows
- Loading branch information
Showing
19 changed files
with
6,891 additions
and
105 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,66 @@ | ||
module.exports = { | ||
extends: [ | ||
'react-app', | ||
"react-app/jest" | ||
], // Extending the "react-app" configuration | ||
|
||
// Add your custom rules here | ||
rules: { | ||
'guard-for-in': 'error', | ||
'prefer-arrow-callback': 'error', | ||
'no-unsafe-negation': [ | ||
'error', | ||
{ | ||
enforceForOrderingRelations: true, | ||
}, | ||
], | ||
'no-unsafe-optional-chaining': [ | ||
'error', | ||
{ | ||
disallowArithmeticOperators: true, | ||
}, | ||
], | ||
eqeqeq: 'error', | ||
'no-else-return': 'error', | ||
'no-lonely-if': 'error', | ||
'no-throw-literal': 'error', | ||
'prefer-promise-reject-errors': 'error', | ||
'no-unneeded-ternary': 'error', | ||
'no-var': 'error', | ||
'object-shorthand': 'error', | ||
'prefer-const': 'error', | ||
'prefer-destructuring': [ | ||
'error', | ||
{ | ||
VariableDeclarator: { | ||
array: true, | ||
object: true, | ||
}, | ||
AssignmentExpression: { | ||
array: true, | ||
object: true, | ||
}, | ||
}, | ||
{ | ||
enforceForRenamedProperties: false, | ||
}, | ||
], | ||
'prefer-exponentiation-operator': 'error', | ||
'prefer-object-spread': 'error', | ||
'prefer-rest-params': 'error', | ||
'prefer-spread': 'error', | ||
}, | ||
|
||
// Ignore patterns for ESLint | ||
ignorePatterns: [ | ||
'**/.github/**', | ||
'build', | ||
'coverage', | ||
'docs', | ||
'lambda', | ||
'node_modules', | ||
'public', | ||
'lib', | ||
'dist', | ||
], | ||
}; |
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
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,28 @@ | ||
name: Build | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
- 'feature/**' | ||
jobs: | ||
run-build: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Docker Compose | ||
run: | | ||
sudo apt-get -y update | ||
sudo apt-get -y install docker-compose | ||
- name: Build Docker Compose | ||
run: | | ||
if ! docker-compose build; then | ||
echo "Docker Compose build failed." | ||
exit 1 # This will cause the workflow to fail | ||
fi |
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,25 @@ | ||
name: Linting Check | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
- 'feature/**' | ||
jobs: | ||
run-linting-check: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16.17.1 | ||
cache: 'npm' | ||
- name: Install modules | ||
run: npm install && npm run prisma:generate | ||
- name: Run linting check | ||
run: npm run lint --max-warnings=0 |
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,25 @@ | ||
name: Prettier Check | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
- 'feature/**' | ||
jobs: | ||
run-prettier-check: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18.17.1 | ||
cache: 'npm' | ||
- name: Install modules | ||
run: npm install | ||
- name: Run prettier check | ||
run: npm run prettier-check |
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 @@ | ||
.github | ||
.vscode | ||
|
||
client/build | ||
client/public/index.html | ||
client/tsconfig.json | ||
|
||
docker-compose.yml | ||
.eslintrc.js |
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,7 @@ | ||
{ | ||
"semi": true, | ||
"trailingComma": "none", | ||
"tabWidth": 2, | ||
"singleQuote": true, | ||
"printWidth": 125 | ||
} |
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,25 @@ | ||
{ | ||
"[typescriptreact]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
"[typescript]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
"[css]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
"[scss]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
"[json]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
"[yaml]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
"[prisma]": { | ||
"editor.defaultFormatter": "Prisma.prisma" | ||
}, | ||
"editor.formatOnSave": true, | ||
"typescript.tsdk": "node_modules/typescript/lib" | ||
} |
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,3 @@ | ||
import React from 'react'; | ||
import { render, screen } from '@testing-library/react'; | ||
import App from './App'; | ||
|
||
|
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,13 +1,11 @@ | ||
body { | ||
margin: 0; | ||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', | ||
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', | ||
sans-serif; | ||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', | ||
'Droid Sans', 'Helvetica Neue', sans-serif; | ||
-webkit-font-smoothing: antialiased; | ||
-moz-osx-font-smoothing: grayscale; | ||
} | ||
|
||
code { | ||
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', | ||
monospace; | ||
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', monospace; | ||
} |
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
Oops, something went wrong.