diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml new file mode 100644 index 0000000..b552ba6 --- /dev/null +++ b/.github/workflows/pr.yml @@ -0,0 +1,44 @@ +name: Website Checks + +on: + pull_request: + branches: + - main + - staging + push: + branches: + - main + - staging + +jobs: + lint: + name: Check formatting + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v3 + with: + node-version: 18 + cache: npm + - name: Install Yarn + run: npm install yarn --global + - name: Install dependencies + run: yarn install + - name: Check formatting with Prettier + run: yarn lint:prettier + build: + name: Build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v3 + with: + node-version: 18 + cache: npm + - name: Install Yarn + run: npm install yarn --global + - name: Install dependencies + run: yarn install + - name: Build website + run: yarn build + diff --git a/.gitignore b/.gitignore index a547bf3..c37a403 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,6 @@ dist-ssr *.njsproj *.sln *.sw? + +*.tsbuildinfo + diff --git a/README.md b/README.md index 74872fd..57acb1a 100644 --- a/README.md +++ b/README.md @@ -1,50 +1,3 @@ -# React + TypeScript + Vite +# Wildhacks 2025 Website +Wildhacks is Northwestern's student run hackathon, this year taking place from April 4-6. This is the repo for the front-facing website. We use React/Vite and Sass and host using GitHub pages and Vercel. -This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. - -Currently, two official plugins are available: - -- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh -- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh - -## Expanding the ESLint configuration - -If you are developing a production application, we recommend updating the configuration to enable type aware lint rules: - -- Configure the top-level `parserOptions` property like this: - -```js -export default tseslint.config({ - languageOptions: { - // other options... - parserOptions: { - project: ['./tsconfig.node.json', './tsconfig.app.json'], - tsconfigRootDir: import.meta.dirname, - }, - }, -}) -``` - -- Replace `tseslint.configs.recommended` to `tseslint.configs.recommendedTypeChecked` or `tseslint.configs.strictTypeChecked` -- Optionally add `...tseslint.configs.stylisticTypeChecked` -- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and update the config: - -```js -// eslint.config.js -import react from 'eslint-plugin-react' - -export default tseslint.config({ - // Set the react version - settings: { react: { version: '18.3' } }, - plugins: { - // Add the react plugin - react, - }, - rules: { - // other rules... - // Enable its recommended rules - ...react.configs.recommended.rules, - ...react.configs['jsx-runtime'].rules, - }, -}) -``` diff --git a/bun.lockb b/bun.lockb index 493affb..479364b 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index 2081edc..d64400c 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,9 @@ "dev": "vite", "build": "tsc -b && vite build", "lint": "eslint .", - "preview": "vite preview" + "preview": "vite preview", + "lint:prettier": "prettier --list-different src", + "lint:format": "prettier --write src" }, "dependencies": { "react": "^18.3.1", @@ -23,6 +25,7 @@ "eslint-plugin-react-hooks": "^5.1.0-rc.0", "eslint-plugin-react-refresh": "^0.4.12", "globals": "^15.9.0", + "prettier": "^3.3.3", "typescript": "^5.5.3", "typescript-eslint": "^8.7.0", "vite": "^5.4.8" diff --git a/src/App.css b/src/App.css index 8b13789..e69de29 100644 --- a/src/App.css +++ b/src/App.css @@ -1 +0,0 @@ - diff --git a/src/App.tsx b/src/App.tsx index 6c44a7c..d22fd3d 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,8 +1,8 @@ -import { Header } from './components/Header/Header.tsx'; -import { Footer } from './components/Footer/Footer.tsx'; -import { Navigation } from './components/Navigation/Navigation.tsx'; -import { SampleSection } from './components/Sections/SampleSection.tsx'; -import { MainWrapper } from './components/MainWrapper/MainWrapper.tsx'; +import { Header } from "./components/Header/Header.tsx"; +import { Footer } from "./components/Footer/Footer.tsx"; +import { Navigation } from "./components/Navigation/Navigation.tsx"; +import { SampleSection } from "./components/Sections/SampleSection.tsx"; +import { MainWrapper } from "./components/MainWrapper/MainWrapper.tsx"; export const App = () => { return ( @@ -15,7 +15,7 @@ export const App = () => { - ) + ); }; export default App; diff --git a/src/components/Footer/Footer.tsx b/src/components/Footer/Footer.tsx index 9e1bf78..1ee4654 100644 --- a/src/components/Footer/Footer.tsx +++ b/src/components/Footer/Footer.tsx @@ -1,13 +1,10 @@ -import React from 'react'; -import './Footer.scss'; +import React from "react"; +import "./Footer.scss"; -export const Footer: React.FC = () => { - return ( -