-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add formatting, linting and CI (#57)
* Add formatting, linting and CI * Apply formatting changes
- Loading branch information
Showing
64 changed files
with
1,734 additions
and
1,445 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 |
---|---|---|
@@ -1,3 +1,7 @@ | ||
{ | ||
"extends": ["next/core-web-vitals", "plugin:mdx/recommended"] | ||
"extends": ["next/core-web-vitals", "plugin:mdx/recommended", "prettier"], | ||
"plugins": ["prettier"], | ||
"rules": { | ||
"prettier/prettier": "error" | ||
} | ||
} |
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,30 @@ | ||
name: Continuous Integration | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: lts/* | ||
|
||
- name: Install dependencies | ||
run: yarn | ||
|
||
- name: Lint | ||
run: yarn lint | ||
|
||
- name: Build | ||
run: yarn build | ||
|
||
# - name: Test | ||
# run: yarn test |
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,3 @@ | ||
{ | ||
"recommendations": ["esbenp.prettier-vscode", "dbaeumer.vscode-eslint"] | ||
} |
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,15 @@ | ||
{ | ||
"[javascript]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
"[javascriptreact]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
"[typescript]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
"[typescriptreact]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
"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
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
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 |
---|---|---|
|
@@ -35,7 +35,11 @@ import { | |
} from "reactstrap"; | ||
|
||
import { faEnvelope } from "@fortawesome/free-solid-svg-icons"; | ||
import { faFacebookSquare, faInstagram, faLinkedinIn } from "@fortawesome/free-brands-svg-icons"; | ||
import { | ||
faFacebookSquare, | ||
faInstagram, | ||
faLinkedinIn, | ||
} from "@fortawesome/free-brands-svg-icons"; | ||
|
||
import Logo from "public/img/brand/logo_white.png"; | ||
import LogoSmall from "public/img/brand/logo_small.png"; | ||
|
@@ -55,8 +59,10 @@ const Navigation = () => { | |
}); | ||
|
||
const getNavLinkClass = (path) => { | ||
return router.pathname === path ? "active" : "navbar-hover navbar-nav-hover align-items-lg-center"; | ||
} | ||
return router.pathname === path | ||
? "active" | ||
: "navbar-hover navbar-nav-hover align-items-lg-center"; | ||
}; | ||
|
||
return ( | ||
<> | ||
|
@@ -81,17 +87,14 @@ const Navigation = () => { | |
<Col className="collapse-brand" xs="6"> | ||
<Link href="/"> | ||
<a> | ||
<Image | ||
alt="..." | ||
src={LogoSmall} | ||
/> | ||
<Image alt="..." src={LogoSmall} /> | ||
</a> | ||
</Link> | ||
</Col> | ||
|
||
<Col className="collapse-close" xs="6"> | ||
{/* Needs two spans to make "X" shape */} | ||
<NavbarToggler onClick={() => setOpen(false)} > | ||
<NavbarToggler onClick={() => setOpen(false)}> | ||
<span /> | ||
<span /> | ||
</NavbarToggler> | ||
|
@@ -117,72 +120,66 @@ const Navigation = () => { | |
|
||
<NavItem> | ||
<Link href="/events" passHref> | ||
<NextNavLink | ||
className={getNavLinkClass("/events")} | ||
> | ||
<NextNavLink className={getNavLinkClass("/events")}> | ||
<span className="nav-link-inner--text">Events</span> | ||
</NextNavLink> | ||
</Link> | ||
</NavItem> | ||
|
||
<NavItem> | ||
<Link href="/publications" passHref> | ||
<NextNavLink | ||
className={getNavLinkClass("/publications")} | ||
> | ||
<NextNavLink className={getNavLinkClass("/publications")}> | ||
<span className="nav-link-inner--text">Publications</span> | ||
</NextNavLink> | ||
</Link> | ||
</NavItem> | ||
|
||
<NavItem> | ||
<Link href="/charity" passHref> | ||
<NextNavLink | ||
className={getNavLinkClass("/charity")} | ||
> | ||
<NextNavLink className={getNavLinkClass("/charity")}> | ||
<span className="nav-link-inner--text">Charity</span> | ||
</NextNavLink> | ||
</Link> | ||
</NavItem> | ||
|
||
<NavItem> | ||
<Link href="/calendar" passHref> | ||
<NextNavLink | ||
className={getNavLinkClass("/calendar")} | ||
> | ||
<NextNavLink className={getNavLinkClass("/calendar")}> | ||
<span className="nav-link-inner--text">Calendar</span> | ||
</NextNavLink> | ||
</Link> | ||
</NavItem> | ||
|
||
</Nav> | ||
|
||
|
||
<Nav className="align-items-lg-center ml-lg-auto" navbar> | ||
<NavIcon | ||
href="https://www.facebook.com/coopsoc.unsw/" | ||
id="tooltip-facebook" | ||
icon={faFacebookSquare} | ||
collapseText="FACEBOOK" | ||
tooltip="Like us on Facebook" /> | ||
tooltip="Like us on Facebook" | ||
/> | ||
<NavIcon | ||
href="mailto: [email protected]" | ||
id="tooltip-email" | ||
icon={faEnvelope} | ||
collapseText="EMAIL" | ||
tooltip="Email us" /> | ||
tooltip="Email us" | ||
/> | ||
<NavIcon | ||
href="https://www.instagram.com/coopsoc_unsw/" | ||
id="tooltip-instagram" | ||
icon={faInstagram} | ||
collapseText="INSTAGRAM" | ||
tooltip="Follow us on Instagram" /> | ||
tooltip="Follow us on Instagram" | ||
/> | ||
<NavIcon | ||
href="https://www.linkedin.com/company/unsw-co-op-society/" | ||
id="tooltip-linkedin" | ||
icon={faLinkedinIn} | ||
collapseText="LINKEDIN" | ||
tooltip="Connect on LinkedIn" /> | ||
tooltip="Connect on LinkedIn" | ||
/> | ||
</Nav> | ||
</Collapse> | ||
</Container> | ||
|
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.