Skip to content

Commit

Permalink
fix eslint errors & upgrade some dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewStanciu committed Dec 19, 2023
1 parent 5961b0a commit ce83685
Show file tree
Hide file tree
Showing 10 changed files with 1,063 additions and 1,015 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"unused-imports/no-unused-imports": "warn",
"no-console": "warn",
"simple-import-sort/imports": "error",
"simple-import-sort/exports": "error"
"simple-import-sort/exports": "error",
"@next/next/no-img-element": "off"
}
}
6 changes: 5 additions & 1 deletion components/footer-links.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import { Discord, Github, Instagram } from '@icons-pack/react-simple-icons'
import {
SiDiscord as Discord,
SiGithub as Github,
SiInstagram as Instagram,
} from '@icons-pack/react-simple-icons'
import { Home } from 'react-feather'

import StyledLink from './styled-link'
Expand Down
1 change: 1 addition & 0 deletions lib/uuid.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable no-console */
import { createClient } from 'next-sanity'
import { v4 as uuidv4 } from 'uuid'

Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
"prepare": "husky install"
},
"dependencies": {
"@icons-pack/react-simple-icons": "^4.6.1",
"@icons-pack/react-simple-icons": "^9.2.0",
"@tailwindcss/forms": "^0.4.0",
"@types/luxon": "^2.0.8",
"@types/uuid": "^8.3.3",
"@vercel/analytics": "^0.1.10",
"autoprefixer": "^10.4.16",
"date-fns": "^2.29.3",
"date-fns": "^3.0.0",
"dotenv": "^16.0.3",
"eslint-plugin-prettier": "^5.0.1",
"eslint-plugin-simple-import-sort": "^10.0.0",
Expand All @@ -24,12 +24,12 @@
"mailgun-js": "^0.22.0",
"marked": "^4.0.4",
"next": "^14.0.4",
"next-sanity": "^4.1.2",
"next-sanity": "^7.0.4",
"next-themes": "^0.2.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-feather": "^2.0.9",
"sanity": "^3.3.1",
"sanity": "^3.21.3",
"sharp": "^0.30.4",
"uuid": "^8.3.2",
"yet-another-react-lightbox": "^2.3.1"
Expand Down
4 changes: 3 additions & 1 deletion pages/api/addToMailingList.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable no-console */
import Mailgun from 'mailgun-js'
import { NextApiRequest, NextApiResponse } from 'next'
import { createClient } from 'next-sanity'
Expand All @@ -12,6 +13,7 @@ const client = createClient({
token: process.env.SANITY_TOKEN,
})

// eslint-disable-next-line import/no-anonymous-default-export
export default (req: NextApiRequest, res: NextApiResponse) =>
new Promise((resolve) => {
const { list, email, eventName, uuid } = req.query
Expand Down Expand Up @@ -41,7 +43,7 @@ export default (req: NextApiRequest, res: NextApiResponse) =>
address: `${list}@purduehackers.com`,
description: list,
})
.catch((err) => {})
.catch((_err) => {})
}
const item: MailingListData = items[0]

Expand Down
5 changes: 4 additions & 1 deletion pages/api/fetchEvents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ import { NextApiRequest, NextApiResponse } from 'next'

import { fetchEvents } from '../../lib/fetchEvents'

export default async (req: NextApiRequest, res: NextApiResponse) => {
export default async function fetchEventsApi(
_req: NextApiRequest,
res: NextApiResponse
) {
const events = await fetchEvents()
res.json(events)
}
2 changes: 2 additions & 0 deletions pages/api/sendReminder.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable no-console */
import Mailgun from 'mailgun-js'
import { NextApiRequest, NextApiResponse } from 'next'
import { createClient } from 'next-sanity'
Expand All @@ -20,6 +21,7 @@ const mg = mailgun({
domain: 'purduehackers.com',
})

// eslint-disable-next-line import/no-anonymous-default-export
export default (req: NextApiRequest, res: NextApiResponse) =>
new Promise((resolve) => {
const { authorization } = req.headers
Expand Down
2 changes: 2 additions & 0 deletions pages/api/verifyEmail.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
/* eslint-disable no-console */
import Mailgun from 'mailgun-js'
import { NextApiRequest, NextApiResponse } from 'next'

import { generateUUID } from '../../lib/uuid'

// eslint-disable-next-line import/no-anonymous-default-export
export default async (req: NextApiRequest, res: NextApiResponse) => {
const { email, eventName, slug } = req.body
const mailgun = Mailgun
Expand Down
2 changes: 0 additions & 2 deletions tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
const { transitionProperty } = require('tailwindcss/defaultTheme')

module.exports = {
mode: 'jit',
content: [
Expand Down
Loading

1 comment on commit ce83685

@vercel
Copy link

@vercel vercel bot commented on ce83685 Dec 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.