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

feat Integrating Pre-commit hook #248 #325

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ By keeping track of their cycles and notifying them, our app Periodo will assist
yarn install
#or
npm install
#or
npm run setup
```
- **Run the project:**
```bash
Expand Down
1 change: 1 addition & 0 deletions periodo/.husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
5 changes: 5 additions & 0 deletions periodo/.husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm run prettier
npm run lint:fix
3 changes: 2 additions & 1 deletion periodo/components/Layout.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

import Header from './navbar'
import Footer from './Footer/Footer'
import React, {Component} from 'react'
Expand All @@ -16,4 +17,4 @@ class Layout extends Component {
}
}

export default Layout;
export default Layout;
112 changes: 56 additions & 56 deletions periodo/components/navbar.component.style.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,60 +3,60 @@ import { makeStyles } from "@material-ui/core/styles";
const drawerWidth = 240;

const useStyles = makeStyles((theme) => ({
root: {
display: "flex",
},
appBar: {
transition: theme.transitions.create(["margin", "width"], {
easing: theme.transitions.easing.sharp,
duration: theme.transitions.duration.leavingScreen,
}),
},
appBarShift: {
width: `calc(100% - ${drawerWidth}px)`,
marginLeft: drawerWidth,
transition: theme.transitions.create(["margin", "width"], {
easing: theme.transitions.easing.easeOut,
duration: theme.transitions.duration.enteringScreen,
}),
},
menuButton: {
marginRight: theme.spacing(2),
},
hide: {
display: "none",
},
drawer: {
width: drawerWidth,
flexShrink: 0,
},
drawerPaper: {
width: drawerWidth,
},
drawerHeader: {
display: "flex",
alignItems: "center",
padding: theme.spacing(0, 1),
// necessary for content to be below app bar
...theme.mixins.toolbar,
justifyContent: "flex-end",
},
content: {
flexGrow: 1,
padding: theme.spacing(3),
transition: theme.transitions.create("margin", {
easing: theme.transitions.easing.sharp,
duration: theme.transitions.duration.leavingScreen,
}),
marginLeft: -drawerWidth,
},
contentShift: {
transition: theme.transitions.create("margin", {
easing: theme.transitions.easing.easeOut,
duration: theme.transitions.duration.enteringScreen,
}),
marginLeft: 0,
},
}));
root: {
display: "flex",
},
appBar: {
transition: theme.transitions.create(["margin", "width"], {
easing: theme.transitions.easing.sharp,
duration: theme.transitions.duration.leavingScreen,
}),
},
appBarShift: {
width: `calc(100% - ${drawerWidth}px)`,
marginLeft: drawerWidth,
transition: theme.transitions.create(["margin", "width"], {
easing: theme.transitions.easing.easeOut,
duration: theme.transitions.duration.enteringScreen,
}),
},
menuButton: {
marginRight: theme.spacing(2),
},
hide: {
display: "none",
},
drawer: {
width: drawerWidth,
flexShrink: 0,
},
drawerPaper: {
width: drawerWidth,
},
drawerHeader: {
display: "flex",
alignItems: "center",
padding: theme.spacing(0, 1),
// necessary for content to be below app bar
...theme.mixins.toolbar,
justifyContent: "flex-end",
},
content: {
flexGrow: 1,
padding: theme.spacing(3),
transition: theme.transitions.create("margin", {
easing: theme.transitions.easing.sharp,
duration: theme.transitions.duration.leavingScreen,
}),
marginLeft: -drawerWidth,
},
contentShift: {
transition: theme.transitions.create("margin", {
easing: theme.transitions.easing.easeOut,
duration: theme.transitions.duration.enteringScreen,
}),
marginLeft: 0,
},
}));

export default useStyles
export default useStyles;
8 changes: 4 additions & 4 deletions periodo/components/navbar.css
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
width: 30px;
min-height: 7px;
margin: 2px;
background-color:rgb(255, 211, 232);
background-color: rgb(255, 211, 232);
}
}
@media screen and (max-width: 1000px) {
Expand All @@ -66,7 +66,7 @@
width: 30px;
min-height: 7px;
margin: 2px;
background-color:rgb(247, 168, 206);
background-color: rgb(247, 168, 206);
}

#nav-btn:checked + .main-navbar {
Expand Down Expand Up @@ -145,7 +145,7 @@
grid-gap: 0px;
}
.nav-options.active {
background: #000000 ;
background: #000000;
left: 0;
opacity: 1;
transition: all 0.5s ease;
Expand All @@ -171,4 +171,4 @@
}
.mobile-menu {
display: block;
}
}
Loading