diff --git a/.eslintrc.js b/.eslintrc.js index 7a1058de..7beb8793 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -9,6 +9,9 @@ module.exports = { "eslint:recommended", "plugin:@typescript-eslint/recommended", "plugin:@typescript-eslint/recommended-requiring-type-checking", + "plugin:import/errors", + "plugin:import/warnings", + "plugin:import/typescript", "plugin:react/recommended", "plugin:prettier/recommended", ], @@ -16,12 +19,37 @@ module.exports = { rules: { "prettier/prettier": "error", + "import/first": "error", + "import/order": [ + "error", + { + "newlines-between": "always", + "alphabetize": { + "order": "asc", + "caseInsensitive": true, + }, + "pathGroups": [ + { + "pattern": "@/**", + "group": "external", + "position": "after", + }, + { + "pattern": "./*.css", + "group": "index", + "position": "after", + } + ], + }, + ], + "react/prop-types": "off", "react-hooks/rules-of-hooks": "error", "react-hooks/exhaustive-deps": "error", // Turn off these rules "@typescript-eslint/explicit-module-boundary-types": "off", + "import/no-unresolved": "off", }, settings: { react: { diff --git a/components/Bubble.tsx b/components/Bubble.tsx index d9db8e39..83b7790a 100644 --- a/components/Bubble.tsx +++ b/components/Bubble.tsx @@ -1,5 +1,7 @@ import React from "react"; + import { DefaultLayout } from "./DefaultLayout"; + import styles from "./Bubble.module.css"; export function Bubble(props: { children: React.ReactNode }) { diff --git a/components/Button.tsx b/components/Button.tsx index e04b2df7..92d75463 100644 --- a/components/Button.tsx +++ b/components/Button.tsx @@ -1,4 +1,5 @@ import React, { AnchorHTMLAttributes, ButtonHTMLAttributes } from "react"; + import styles from "./Button.module.css"; interface ButtonProps extends ButtonHTMLAttributes { diff --git a/components/ConnectWithUs.tsx b/components/ConnectWithUs.tsx index cef31144..7e9d333b 100644 --- a/components/ConnectWithUs.tsx +++ b/components/ConnectWithUs.tsx @@ -1,7 +1,9 @@ import React from "react"; -import styles from "./ConnectWithUs.module.css"; -import { SocialLinks } from "./SocialLinks"; + import { Link } from "./Link"; +import { SocialLinks } from "./SocialLinks"; + +import styles from "./ConnectWithUs.module.css"; export function ConnectWithUs() { return ( diff --git a/components/DefaultLayout.tsx b/components/DefaultLayout.tsx index 1cc4fb4f..49992358 100644 --- a/components/DefaultLayout.tsx +++ b/components/DefaultLayout.tsx @@ -1,4 +1,5 @@ import React from "react"; + import styles from "./DefaultLayout.module.css"; export function DefaultLayout(props: { children: React.ReactNode }) { diff --git a/components/EmailSignup.tsx b/components/EmailSignup.tsx index c5e3ba0e..9a1885ae 100644 --- a/components/EmailSignup.tsx +++ b/components/EmailSignup.tsx @@ -1,8 +1,10 @@ import React from "react"; -import styles from "./EmailSignup.module.css"; + import { Button } from "./Button"; import { Input } from "./Input"; +import styles from "./EmailSignup.module.css"; + export function EmailSignup() { return (
diff --git a/components/EventCard.tsx b/components/EventCard.tsx index 81a07ada..eeae0997 100644 --- a/components/EventCard.tsx +++ b/components/EventCard.tsx @@ -1,10 +1,11 @@ import React, { ReactNode } from "react"; -import { Button } from "./Button"; -import styles from "./EventCard.module.css"; +import { Button } from "./Button"; import { EventSetting } from "./EventSetting"; import { Image } from "./Image"; +import styles from "./EventCard.module.css"; + interface EventCardProps { name: string; short: string; diff --git a/components/EventDescriptionCard.tsx b/components/EventDescriptionCard.tsx index 11c73d97..86c9b3db 100644 --- a/components/EventDescriptionCard.tsx +++ b/components/EventDescriptionCard.tsx @@ -1,10 +1,12 @@ import React from "react"; + import { Button } from "./Button"; -import { Image } from "./Image"; import { EventSetting } from "./EventSetting"; -import styles from "./EventDescriptionCard.module.css"; +import { Image } from "./Image"; import { Discord, Twitch, Instagram, Facebook } from "./SocialLinks"; +import styles from "./EventDescriptionCard.module.css"; + interface Props { name: string; short: string; diff --git a/components/EventSetting.tsx b/components/EventSetting.tsx index aa95025c..a0725385 100644 --- a/components/EventSetting.tsx +++ b/components/EventSetting.tsx @@ -1,4 +1,5 @@ import React from "react"; + import styles from "./EventSetting.module.css"; interface Props { diff --git a/components/Footer.tsx b/components/Footer.tsx index 0ce6c715..e0fac676 100644 --- a/components/Footer.tsx +++ b/components/Footer.tsx @@ -1,7 +1,9 @@ import React from "react"; -import styles from "./Footer.module.css"; + import { SocialLinks } from "./SocialLinks"; +import styles from "./Footer.module.css"; + export function Footer() { return (