Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pre-Commit Hook - Milestone 1 (FOSS Overflow 2024) #107

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ node_modules
*.log
*.env
*.pyc
*.sqlite3
*.sqlite3
overflow
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

pnpm dlx --no-install lint-staged
32 changes: 32 additions & 0 deletions app/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"env": {
"browser": true,
"es2021": true
},
"extends": [
"standard",
"plugin:react/recommended"
],
"overrides": [
{
"env": {
"node": true
},
"files": [
".eslintrc.{js,cjs}"
],
"parserOptions": {
"sourceType": "script"
}
}
],
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": [
"react"
],
"rules": {
}
}
1 change: 1 addition & 0 deletions app/.husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
16 changes: 16 additions & 0 deletions app/.prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"arrowParens": "always",
"bracketSpacing": true,
"embeddedLanguageFormatting": "auto",
"htmlWhitespaceSensitivity": "css",
"insertPragma": false,
"jsxBracketSameLine": false,
"jsxSingleQuote": false,
"printWidth": 80,
"proseWrap": "preserve",
"semi": true,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "es5",
"useTabs": false
}
7 changes: 6 additions & 1 deletion app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,27 @@
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).

## Installations

We need **pnpm** to run this application. ( you can simply use pnpm instead of yarn)

For **linux**<br>

#### `curl -f https://get.pnpm.io/v6.6.js | node - add --global pnpm`

For **Windows** (Powershell)<br>

#### `(Invoke-WebRequest 'https://get.pnpm.io/v6.6.js' -UseBasicParsing).Content | node - add --global pnpm`

## Using npm

#### `npm install -g pnpm`

## To run the application

#### `pnpm install` <br>

In the project directory, you can run:<br>

#### `pnpm start`

This runs the app in the development mode.
Expand Down Expand Up @@ -73,4 +79,3 @@ This section has moved here: [https://facebook.github.io/create-react-app/docs/a
### Deployment

This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment)

62 changes: 44 additions & 18 deletions app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,34 +3,47 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@emotion/react": "^11.10.4",
"@emotion/styled": "^11.10.4",
"@material-ui/core": "^4.11.4",
"@material-ui/icons": "^4.11.2",
"@mui/icons-material": "^5.11.0",
"@mui/material": "^5.10.9",
"@emotion/react": "^11.11.3",
"@emotion/styled": "^11.11.0",
"@material-ui/core": "^4.12.4",
"@material-ui/icons": "^4.11.3",
"@mui/icons-material": "^5.15.5",
"@mui/material": "^5.15.5",
"@nivo/core": "^0.73.0",
"@nivo/line": "^0.73.0",
"@testing-library/jest-dom": "^5.11.4",
"@testing-library/react": "^11.1.0",
"@testing-library/user-event": "^12.1.10",
"axios": "^1.4.0",
"@testing-library/jest-dom": "^5.17.0",
"@testing-library/react": "^11.2.7",
"@testing-library/user-event": "^12.8.3",
"axios": "^1.6.5",
"jwt-decode": "^3.1.2",
"material-ui-search-bar": "^1.0.0",
"react": "^16.8.0",
"react-apexcharts": "^1.4.0",
"material-ui-search-bar": "^1.0.1",
"react": "^16.14.0",
"react-apexcharts": "^1.4.1",
"react-dom": "^17.0.2",
"react-icons": "^4.7.1",
"react-router-dom": "^5.2.0",
"react-icons": "^4.12.0",
"react-router-dom": "^5.3.4",
"react-scripts": "^5.0.1",
"styled-components": "^5.3.6",
"web-vitals": "^1.0.1"
"styled-components": "^5.3.11",
"web-vitals": "^1.1.2"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
"eject": "react-scripts eject",
"lint": "eslint src",
"configure-husky": "cd .. && pnpm dlx husky install && pnpm dlx husky add .husky/pre-commit \"pnpm dlx lint-staged\""
},
"lint-staged": {
"**/*.{js,jsx,json}": [
"eslint . --fix",
"prettier --write ."
]
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"eslintConfig": {
"extends": [
Expand All @@ -49,5 +62,18 @@
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"eslint": "^8.56.0",
"eslint-config-standard": "^17.1.0",
"eslint-plugin-import": "^2.25.2",
"eslint-plugin-n": "^15.0.0 || ^16.0.0 ",
"eslint-plugin-promise": "^6.0.0",
"eslint-plugin-react": "^7.33.2",
"husky": "^6.0.0",
"jest": "^26.6.3",
"lint-staged": "^15.2.0",
"precise-commits": "^1.0.2",
"prettier": "^2.8.8"
}
}
Loading