-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #100 from sandboxnu/eslint
Add eslint configuration
- Loading branch information
Showing
44 changed files
with
3,770 additions
and
2,604 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 @@ | ||
SKIP_PREFLIGHT_CHECK=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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
module.exports = { | ||
extends: ['airbnb-typescript', 'eslint-config-prettier'], | ||
parserOptions: { | ||
project: './tsconfig.eslint.json', | ||
}, | ||
plugins: ['prettier'], | ||
rules: { | ||
'prettier/prettier': [ | ||
'error', | ||
{ | ||
singleQuote: true, | ||
printWidth: 80, | ||
arrowParens: 'avoid', | ||
trailingComma: 'all', | ||
}, | ||
], | ||
// incompatible with prettier | ||
'react/jsx-curly-newline': 'off', | ||
'react/jsx-indent': 'off', | ||
'react/jsx-wrap-multilines': 'off', | ||
'react/jsx-closing-tag-location': 'off', | ||
'react/no-array-index-key': 'warn', | ||
'@typescript-eslint/indent': 'off', | ||
|
||
// we're using typescript, so we have prop types | ||
'react/prop-types': 'off', | ||
|
||
// personal preference | ||
'react/jsx-props-no-spreading': 'off', | ||
}, | ||
}; |
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,6 +1,5 @@ | ||
const tailwindcss = require('tailwindcss'); | ||
|
||
module.exports = { | ||
plugins: [ | ||
tailwindcss('./tailwind.config.js') | ||
] | ||
plugins: [tailwindcss('./tailwind.config.js')], | ||
}; |
This file was deleted.
Oops, something went wrong.
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,50 @@ | ||
import React from 'react'; | ||
import { BrowserRouter, Route, Switch } from 'react-router-dom'; | ||
import { createMuiTheme } from '@material-ui/core/styles'; | ||
import { ThemeProvider } from '@material-ui/styles'; | ||
import Navbar from './Navbar'; | ||
import Footer from './footer'; | ||
|
||
import './index.css'; | ||
import AboutPage from './aboutPage/AboutPage'; | ||
import LandingPage from './landingPage/LandingPage'; | ||
import ModulePage from './modulePage/ModulePage'; | ||
|
||
// change colors as needed | ||
const THEME = createMuiTheme({ | ||
palette: { | ||
primary: { | ||
main: '#394D73', // same as footer color | ||
}, | ||
secondary: { | ||
main: '#0FD4C0', // logo teal | ||
}, | ||
}, | ||
}); | ||
|
||
function App() { | ||
return ( | ||
<BrowserRouter> | ||
<div className="App" id="app"> | ||
<ThemeProvider theme={THEME}> | ||
<div className="App-header"> | ||
<Navbar /> | ||
</div> | ||
<main className="font-mono text-lg font-charcoal"> | ||
<Switch> | ||
<Route exact path="/" component={LandingPage} /> | ||
<Route path="/home" component={LandingPage} /> | ||
<Route path="/modules/:module" component={ModulePage} /> | ||
<Route path="/about" component={AboutPage} /> | ||
</Switch> | ||
</main> | ||
<div> | ||
<Footer /> | ||
</div> | ||
</ThemeProvider> | ||
</div> | ||
</BrowserRouter> | ||
); | ||
} | ||
|
||
export default App; |
This file was deleted.
Oops, something went wrong.
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,45 @@ | ||
import React, { useState } from 'react'; | ||
import descriptions from './media/modules/module_descriptions.json'; | ||
|
||
export default function ModuleDropdown() { | ||
const [buttonHover, setButtonHover] = useState(false); | ||
const [dropdownHover, setDropdownHover] = useState(false); | ||
|
||
return ( | ||
<div className=""> | ||
<button | ||
type="button" | ||
onMouseOver={() => setButtonHover(true)} | ||
onFocus={() => setButtonHover(true)} | ||
onMouseOut={() => setButtonHover(false)} | ||
onBlur={() => setButtonHover(false)} | ||
> | ||
<p className="text-xs text-white uppercase font-opensans font-bold"> | ||
Modules | ||
</p> | ||
</button> | ||
<div | ||
className={`absolute ${ | ||
!(buttonHover || dropdownHover) && 'hidden' | ||
} -mt-1 -ml-10 justify-start rounded-b divide-y divide-moduleDarkBlue bg-navbar`} | ||
onMouseOver={() => setDropdownHover(true)} | ||
onFocus={() => setDropdownHover(true)} | ||
onMouseOut={() => setDropdownHover(false)} | ||
onBlur={() => setDropdownHover(false)} | ||
> | ||
<br /> | ||
{descriptions.modules.map(module => ( | ||
<div className="py-1 mx-2 text-left"> | ||
<a | ||
className="text-xs uppercase font-opensans font-bold text-white hover:text-moduleTeal" | ||
href={`/modules/${module.path}`} | ||
key={module.number.toString()} | ||
> | ||
{module.dropdownTitle} | ||
</a> | ||
</div> | ||
))} | ||
</div> | ||
</div> | ||
); | ||
} |
This file was deleted.
Oops, something went wrong.
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,43 @@ | ||
import React from 'react'; | ||
import ModuleDropdown from './ModuleDropdown'; | ||
import logo from './media/landingPage/logo_blink.svg'; | ||
|
||
export default function Navbar() { | ||
return ( | ||
<nav className="flex justify-between px-2 bg-navbar" id="navbar-container"> | ||
<div className="flex my-1 ml-6 sm:ml-12 lg:ml-40" id="logo-container"> | ||
<a href="/"> | ||
<object | ||
className="pointer-events-none py-2 w-24 h-10" | ||
type="image/svg+xml" | ||
data={logo} | ||
> | ||
Logo | ||
</object> | ||
</a> | ||
</div> | ||
<div className="my-3 justify-between" id="links-container"> | ||
<ul className="flex sm:mr-6 lg:mr-40" id="nav-list"> | ||
<li className="mr-8 border-b-2 border-transparent hover:border-teal-a-eye duration-300 ease-in-out"> | ||
<a className="" href="/"> | ||
<p className="text-xs text-white uppercase font-opensans font-bold"> | ||
Home | ||
</p> | ||
</a> | ||
</li> | ||
<li className="mx-8 -mt-1 border-b-2 border-transparent hover:border-teal-a-eye duration-300 ease-in-out"> | ||
{/* <a className="" href="/modules"><p className="text-xs text-white uppercase font-opensans font-bold">Modules</p></a> */} | ||
<ModuleDropdown /> | ||
</li> | ||
<li className="mx-8 border-b-2 border-transparent hover:border-teal-a-eye duration-300 ease-in-out"> | ||
<a className="" href="/about"> | ||
<p className="text-xs text-white uppercase font-opensans font-bold"> | ||
About | ||
</p> | ||
</a> | ||
</li> | ||
</ul> | ||
</div> | ||
</nav> | ||
); | ||
} |
Oops, something went wrong.
25a99f3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs: