From aafc07a8ab178da724173436bd544e8fec5e1aed Mon Sep 17 00:00:00 2001 From: Anton Veselev Date: Tue, 2 Jan 2024 11:24:08 +0000 Subject: [PATCH] upd --- .eslintrc.js | 30 ++++++++++++++++++++++++++++++ src/pages/cl/gs/index.tsx | 1 - src/pages/cl/ko/index.tsx | 1 - src/pages/el/gs/index.tsx | 2 -- src/pages/el/ko/index.tsx | 1 - src/pages/wc/gs/index.tsx | 2 -- src/routes/Navbar/SelectSeason.tsx | 1 - src/routes/Pages/index.tsx | 2 -- src/routes/index.tsx | 1 - src/ui/Announcement/Download.tsx | 1 - src/ui/Announcement/index.tsx | 1 - src/ui/Dots.tsx | 1 - src/ui/Notification.tsx | 1 - src/ui/Portal.tsx | 1 - src/utils/makeStoreHook.ts | 1 - 15 files changed, 30 insertions(+), 17 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index c56f025a..ab97fcc2 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -134,6 +134,36 @@ module.exports = { ], 'inker/react-ref-name': 2, + "import/order": [ + 2, + { + groups: [ + "builtin", + "external", + "internal", + "parent", + "sibling", + "index", + ], + "newlines-between": "always-and-inside-groups", + pathGroups: [ + { + pattern: "react", + group: "external", + position: "before", + }, + { + pattern: "./*.module.{css,scss,postcss}", + group: "sibling", + position: "after", + }, + ], + distinctGroup: false, + pathGroupsExcludedImportTypes: ["react"], + warnOnUnassignedImports: true, + }, + ], + 'react/prop-types': 0, 'react/react-in-jsx-scope': 0, 'react/require-default-props': 0, diff --git a/src/pages/cl/gs/index.tsx b/src/pages/cl/gs/index.tsx index e36076c7..a298e967 100644 --- a/src/pages/cl/gs/index.tsx +++ b/src/pages/cl/gs/index.tsx @@ -1,5 +1,4 @@ import { memo, useCallback, useEffect, useRef, useState } from 'react' - import { css } from 'styled-components' import { random, sample, shuffle } from 'lodash' diff --git a/src/pages/cl/ko/index.tsx b/src/pages/cl/ko/index.tsx index 5d6e3f0d..28e2235b 100644 --- a/src/pages/cl/ko/index.tsx +++ b/src/pages/cl/ko/index.tsx @@ -1,5 +1,4 @@ import { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react' - import { random, shuffle } from 'lodash' import { type FixedArray } from 'model/types' diff --git a/src/pages/el/gs/index.tsx b/src/pages/el/gs/index.tsx index 24bd6e17..48cc02de 100644 --- a/src/pages/el/gs/index.tsx +++ b/src/pages/el/gs/index.tsx @@ -1,7 +1,5 @@ import { memo, useCallback, useEffect, useRef, useState } from 'react' - import { css } from 'styled-components' - import { random, shuffle } from 'lodash' import type Team from 'model/team/GsTeam' diff --git a/src/pages/el/ko/index.tsx b/src/pages/el/ko/index.tsx index 1e075f62..f8803b02 100644 --- a/src/pages/el/ko/index.tsx +++ b/src/pages/el/ko/index.tsx @@ -1,5 +1,4 @@ import { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react' - import { random, shuffle } from 'lodash' import { type FixedArray } from 'model/types' diff --git a/src/pages/wc/gs/index.tsx b/src/pages/wc/gs/index.tsx index 8b39e42f..5b5ca79e 100644 --- a/src/pages/wc/gs/index.tsx +++ b/src/pages/wc/gs/index.tsx @@ -1,7 +1,5 @@ import { memo, useCallback, useEffect, useRef, useState } from 'react' - import { css } from 'styled-components' - import { constant, random, shuffle } from 'lodash' import type Team from 'model/team/NationalTeam' diff --git a/src/routes/Navbar/SelectSeason.tsx b/src/routes/Navbar/SelectSeason.tsx index 4aa118d3..4c44dfb6 100644 --- a/src/routes/Navbar/SelectSeason.tsx +++ b/src/routes/Navbar/SelectSeason.tsx @@ -1,5 +1,4 @@ import { memo, useCallback } from 'react' - import { range } from 'lodash' import type Tournament from 'model/Tournament' diff --git a/src/routes/Pages/index.tsx b/src/routes/Pages/index.tsx index eca83b1f..2c4e00c3 100644 --- a/src/routes/Pages/index.tsx +++ b/src/routes/Pages/index.tsx @@ -1,7 +1,5 @@ import { memo, useEffect, useState } from 'react' - import { useParams } from 'react-router-dom' - import delay from 'delay.js' import type Team from 'model/team' diff --git a/src/routes/index.tsx b/src/routes/index.tsx index 499bcf66..56dc068f 100644 --- a/src/routes/index.tsx +++ b/src/routes/index.tsx @@ -1,5 +1,4 @@ import { memo, useCallback, useEffect, useMemo } from 'react' - import { Navigate, Route, diff --git a/src/ui/Announcement/Download.tsx b/src/ui/Announcement/Download.tsx index a0ec5630..f111f0db 100644 --- a/src/ui/Announcement/Download.tsx +++ b/src/ui/Announcement/Download.tsx @@ -1,5 +1,4 @@ import { type RefObject, memo, useCallback, useEffect, useState } from 'react' - import delay from 'delay.js' import ButtonLink from 'ui/ButtonLink' diff --git a/src/ui/Announcement/index.tsx b/src/ui/Announcement/index.tsx index daf8fd14..cb4425b1 100644 --- a/src/ui/Announcement/index.tsx +++ b/src/ui/Announcement/index.tsx @@ -1,5 +1,4 @@ import { type RefObject, memo, useEffect, useRef } from 'react' - import styled from 'styled-components' import type Club from 'model/team/Club' diff --git a/src/ui/Dots.tsx b/src/ui/Dots.tsx index fab79cca..0787b98d 100644 --- a/src/ui/Dots.tsx +++ b/src/ui/Dots.tsx @@ -1,5 +1,4 @@ import { memo, useEffect, useState } from 'react' - import styled from 'styled-components' const InvisibleSpan = styled.span` diff --git a/src/ui/Notification.tsx b/src/ui/Notification.tsx index a035a0dc..95a1aecb 100644 --- a/src/ui/Notification.tsx +++ b/src/ui/Notification.tsx @@ -1,5 +1,4 @@ import { type ReactNode, memo } from 'react' - import styled from 'styled-components' import Modal from './Modal' diff --git a/src/ui/Portal.tsx b/src/ui/Portal.tsx index ea26fc26..f459fe23 100644 --- a/src/ui/Portal.tsx +++ b/src/ui/Portal.tsx @@ -1,5 +1,4 @@ import { type ReactNode, memo, useEffect, useMemo, useRef } from 'react' - import ReactDOM from 'react-dom' import htmlTags from 'html-tags' diff --git a/src/utils/makeStoreHook.ts b/src/utils/makeStoreHook.ts index 5f56d78d..1f71e6e7 100644 --- a/src/utils/makeStoreHook.ts +++ b/src/utils/makeStoreHook.ts @@ -1,5 +1,4 @@ import { useCallback, useEffect, useState } from 'react' - import { pull } from 'lodash' export default (initialState: S | (() => S)) => {