Skip to content

Commit

Permalink
Lint files
Browse files Browse the repository at this point in the history
  • Loading branch information
AbdBarho committed Dec 29, 2022
1 parent 71e260e commit 0ffbe62
Show file tree
Hide file tree
Showing 12 changed files with 265 additions and 17 deletions.
2 changes: 1 addition & 1 deletion website/.eslintrc.json
Expand Up @@ -6,6 +6,6 @@
"next/core-web-vitals"
],
"rules": {
"sort-imports": "error"
"sort-imports": "warn"
}
}
252 changes: 252 additions & 0 deletions website/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion website/src/components/CircleBackground.tsx
@@ -1,7 +1,7 @@
import { useId } from "react";

export function CircleBackground({ color, width = 558, height = 558, ...props }) {
let id = useId();
const id = useId();

return (
<svg viewBox="0 0 558 558" width={width} height={height} fill="none" aria-hidden="true" {...props}>
Expand Down
2 changes: 0 additions & 2 deletions website/src/components/Footer.tsx
@@ -1,7 +1,5 @@
import Image from "next/image";
import Link from "next/link";

import { FaGithub, FaDiscord } from "react-icons/fa";
import { Container } from "./Container";

export function Footer() {
Expand Down
4 changes: 2 additions & 2 deletions website/src/components/Header/Header.tsx
Expand Up @@ -3,8 +3,8 @@ import { Popover } from "@headlessui/react";
import { AnimatePresence, motion } from "framer-motion";
import Image from "next/image";
import Link from "next/link";
import { signOut, useSession } from "next-auth/react";
import { FaUser, FaSignOutAlt } from "react-icons/fa";
import { useSession } from "next-auth/react";
import { FaUser } from "react-icons/fa";

import { Container } from "src/components/Container";
import { NavLinks } from "./NavLinks";
Expand Down
2 changes: 1 addition & 1 deletion website/src/components/Header/NavLinks.tsx
Expand Up @@ -3,7 +3,7 @@ import Link from "next/link";
import { AnimatePresence, motion } from "framer-motion";

export function NavLinks(): JSX.Element {
let [hoveredIndex, setHoveredIndex] = useState(null);
const [hoveredIndex, setHoveredIndex] = useState(null);

return (
<>
Expand Down
2 changes: 1 addition & 1 deletion website/src/components/Header/UserMenu.tsx
Expand Up @@ -3,7 +3,7 @@ import { signOut, useSession } from "next-auth/react";
import Image from "next/image";
import { Popover } from "@headlessui/react";
import { AnimatePresence, motion } from "framer-motion";
import { FaCog, FaSignOutAlt, FaGithub } from "react-icons/fa";
import { FaCog, FaSignOutAlt } from "react-icons/fa";

export function UserMenu() {
const { data: session } = useSession();
Expand Down
2 changes: 1 addition & 1 deletion website/src/components/Layout.tsx
Expand Up @@ -5,7 +5,7 @@ import type { NextPage } from "next";
import { Footer } from "./Footer";
import { Header } from "src/components/Header";

export type NextPageWithLayout<P = {}, IP = P> = NextPage<P, IP> & {
export type NextPageWithLayout<P = unknown, IP = P> = NextPage<P, IP> & {
getLayout?: (page: React.ReactElement) => React.ReactNode;
};

Expand Down
6 changes: 3 additions & 3 deletions website/src/lib/prismadb.ts
@@ -1,10 +1,10 @@
import { PrismaClient } from "@prisma/client";

declare global {
var prisma;
// eslint-disable-next-line no-var
var prisma: PrismaClient | undefined;
}

const client = globalThis.prisma || new PrismaClient();
const client = new PrismaClient();
if (process.env.NODE_ENV !== "production") {
globalThis.prisma = client;
}
Expand Down
2 changes: 1 addition & 1 deletion website/src/pages/_app.tsx
Expand Up @@ -4,7 +4,7 @@ import { Inter } from "@next/font/google";
import { extendTheme } from "@chakra-ui/react";
import type { AppProps } from "next/app";

import { getDefaultLayout, NextPageWithLayout } from "src/components/Layout";
import { NextPageWithLayout, getDefaultLayout } from "src/components/Layout";

import "../styles/globals.css";
import "focus-visible";
Expand Down
2 changes: 1 addition & 1 deletion website/src/pages/evaluate/rank_initial_prompts.tsx
@@ -1,4 +1,4 @@
import { ArrowUpIcon, ArrowDownIcon } from "@heroicons/react/20/solid";
import { ArrowDownIcon, ArrowUpIcon } from "@heroicons/react/20/solid";
import clsx from "clsx";
import Head from "next/head";
import { useState } from "react";
Expand Down
4 changes: 1 addition & 3 deletions website/src/pages/leaderboard/score-leaderboard.tsx
@@ -1,7 +1,5 @@
import RankItem from "src/components/RankItem";
import { BarsArrowUpIcon, BarsArrowDownIcon } from "@heroicons/react/24/solid";
import Image from "next/image";
import { HiBarsArrowUp, HiBarsArrowDown } from "react-icons/hi2";
import { HiBarsArrowDown } from "react-icons/hi2";

const LeaderBoard = () => {
const PlaceHolderProps = { username: "test_user", score: 10 };
Expand Down

0 comments on commit 0ffbe62

Please sign in to comment.