mirror of
https://github.com/usememos/memos.git
synced 2024-12-25 20:32:18 +03:00
chore: reorder imports manually (#106)
* chore: reorder imports manually * chore: remove unused less
This commit is contained in:
parent
6b5d5e757e
commit
346d219cd5
@ -23,12 +23,11 @@
|
|||||||
],
|
],
|
||||||
"@typescript-eslint/no-empty-interface": ["off"],
|
"@typescript-eslint/no-empty-interface": ["off"],
|
||||||
"@typescript-eslint/no-explicit-any": ["off"],
|
"@typescript-eslint/no-explicit-any": ["off"],
|
||||||
"react/react-in-jsx-scope": "off",
|
"react/react-in-jsx-scope": "off"
|
||||||
"sort-imports": [
|
},
|
||||||
"error",
|
"settings": {
|
||||||
{
|
"react": {
|
||||||
"memberSyntaxSortOrder": ["all", "multiple", "single", "none"]
|
"version": "detect"
|
||||||
}
|
}
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import { appRouterSwitch } from "./routers";
|
import { appRouterSwitch } from "./routers";
|
||||||
import { useAppSelector } from "./store";
|
import { useAppSelector } from "./store";
|
||||||
import "./less/app.less";
|
|
||||||
|
|
||||||
function App() {
|
function App() {
|
||||||
const pathname = useAppSelector((state) => state.location.pathname);
|
const pathname = useAppSelector((state) => state.location.pathname);
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import { useEffect } from "react";
|
import { useEffect } from "react";
|
||||||
import { showDialog } from "./Dialog";
|
|
||||||
import useLoading from "../hooks/useLoading";
|
|
||||||
import toastHelper from "./Toast";
|
|
||||||
import { userService } from "../services";
|
import { userService } from "../services";
|
||||||
|
import useLoading from "../hooks/useLoading";
|
||||||
|
import { showDialog } from "./Dialog";
|
||||||
|
import toastHelper from "./Toast";
|
||||||
import "../less/confirm-reset-openid-dialog.less";
|
import "../less/confirm-reset-openid-dialog.less";
|
||||||
|
|
||||||
interface Props extends DialogProps {}
|
interface Props extends DialogProps {}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { IMAGE_URL_REG } from "../helpers/consts";
|
import { IMAGE_URL_REG } from "../helpers/consts";
|
||||||
import * as utils from "../helpers/utils";
|
import * as utils from "../helpers/utils";
|
||||||
import { formatMemoContent } from "./Memo";
|
|
||||||
import Only from "./common/OnlyWhen";
|
import Only from "./common/OnlyWhen";
|
||||||
|
import { formatMemoContent } from "./Memo";
|
||||||
import "../less/daily-memo.less";
|
import "../less/daily-memo.less";
|
||||||
|
|
||||||
interface DailyMemo extends Memo {
|
interface DailyMemo extends Memo {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { createRoot } from "react-dom/client";
|
import { createRoot } from "react-dom/client";
|
||||||
|
import { ANIMATION_DURATION } from "../helpers/consts";
|
||||||
import { Provider } from "react-redux";
|
import { Provider } from "react-redux";
|
||||||
import store from "../store";
|
import store from "../store";
|
||||||
import { ANIMATION_DURATION } from "../helpers/consts";
|
|
||||||
import "../less/dialog.less";
|
import "../less/dialog.less";
|
||||||
|
|
||||||
interface DialogConfig {
|
interface DialogConfig {
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
import { memo, useEffect, useRef, useState } from "react";
|
import { memo, useEffect, useRef, useState } from "react";
|
||||||
import { escape, indexOf } from "lodash-es";
|
import { escape, indexOf } from "lodash-es";
|
||||||
import { IMAGE_URL_REG, LINK_REG, MEMO_LINK_REG, TAG_REG, UNKNOWN_ID } from "../helpers/consts";
|
import { IMAGE_URL_REG, LINK_REG, MEMO_LINK_REG, TAG_REG, UNKNOWN_ID } from "../helpers/consts";
|
||||||
import { DONE_BLOCK_REG, parseMarkedToHtml, TODO_BLOCK_REG } from "../helpers/marked";
|
|
||||||
import * as utils from "../helpers/utils";
|
import * as utils from "../helpers/utils";
|
||||||
|
import { DONE_BLOCK_REG, parseMarkedToHtml, TODO_BLOCK_REG } from "../helpers/marked";
|
||||||
import { editorStateService, locationService, memoService, userService } from "../services";
|
import { editorStateService, locationService, memoService, userService } from "../services";
|
||||||
import Only from "./common/OnlyWhen";
|
import Only from "./common/OnlyWhen";
|
||||||
|
import toastHelper from "./Toast";
|
||||||
import Image from "./Image";
|
import Image from "./Image";
|
||||||
import showMemoCardDialog from "./MemoCardDialog";
|
import showMemoCardDialog from "./MemoCardDialog";
|
||||||
import showShareMemoImageDialog from "./ShareMemoImageDialog";
|
import showShareMemoImageDialog from "./ShareMemoImageDialog";
|
||||||
import toastHelper from "./Toast";
|
|
||||||
import "../less/memo.less";
|
import "../less/memo.less";
|
||||||
|
|
||||||
const MAX_MEMO_CONTAINER_HEIGHT = 384;
|
const MAX_MEMO_CONTAINER_HEIGHT = 384;
|
||||||
|
@ -3,11 +3,11 @@ import { IMAGE_URL_REG, MEMO_LINK_REG, UNKNOWN_ID } from "../helpers/consts";
|
|||||||
import * as utils from "../helpers/utils";
|
import * as utils from "../helpers/utils";
|
||||||
import { editorStateService, memoService } from "../services";
|
import { editorStateService, memoService } from "../services";
|
||||||
import { parseHtmlToRawText } from "../helpers/marked";
|
import { parseHtmlToRawText } from "../helpers/marked";
|
||||||
import { formatMemoContent } from "./Memo";
|
import Only from "./common/OnlyWhen";
|
||||||
import toastHelper from "./Toast";
|
import toastHelper from "./Toast";
|
||||||
import { showDialog } from "./Dialog";
|
import { showDialog } from "./Dialog";
|
||||||
import Only from "./common/OnlyWhen";
|
|
||||||
import Image from "./Image";
|
import Image from "./Image";
|
||||||
|
import { formatMemoContent } from "./Memo";
|
||||||
import "../less/memo-card-dialog.less";
|
import "../less/memo-card-dialog.less";
|
||||||
import "../less/memo-content.less";
|
import "../less/memo-content.less";
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import React, { useCallback, useEffect, useMemo, useRef } from "react";
|
import React, { useCallback, useEffect, useMemo, useRef } from "react";
|
||||||
|
import { UNKNOWN_ID } from "../helpers/consts";
|
||||||
import { editorStateService, locationService, memoService, resourceService } from "../services";
|
import { editorStateService, locationService, memoService, resourceService } from "../services";
|
||||||
import { useAppSelector } from "../store";
|
import { useAppSelector } from "../store";
|
||||||
import { UNKNOWN_ID } from "../helpers/consts";
|
|
||||||
import * as storage from "../helpers/storage";
|
import * as storage from "../helpers/storage";
|
||||||
import useToggle from "../hooks/useToggle";
|
import useToggle from "../hooks/useToggle";
|
||||||
import toastHelper from "./Toast";
|
import toastHelper from "./Toast";
|
||||||
|
@ -4,8 +4,8 @@ import { useAppSelector } from "../store";
|
|||||||
import { IMAGE_URL_REG, LINK_REG, MEMO_LINK_REG, TAG_REG } from "../helpers/consts";
|
import { IMAGE_URL_REG, LINK_REG, MEMO_LINK_REG, TAG_REG } from "../helpers/consts";
|
||||||
import * as utils from "../helpers/utils";
|
import * as utils from "../helpers/utils";
|
||||||
import { checkShouldShowMemoWithFilters } from "../helpers/filter";
|
import { checkShouldShowMemoWithFilters } from "../helpers/filter";
|
||||||
import Memo from "./Memo";
|
|
||||||
import toastHelper from "./Toast";
|
import toastHelper from "./Toast";
|
||||||
|
import Memo from "./Memo";
|
||||||
import "../less/memo-list.less";
|
import "../less/memo-list.less";
|
||||||
|
|
||||||
interface Props {}
|
interface Props {}
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import { useEffect, useRef } from "react";
|
import { useEffect, useRef } from "react";
|
||||||
import * as api from "../helpers/api";
|
import * as api from "../helpers/api";
|
||||||
import { locationService, userService } from "../services";
|
import { locationService, userService } from "../services";
|
||||||
import showAboutSiteDialog from "./AboutSiteDialog";
|
|
||||||
import toastHelper from "./Toast";
|
import toastHelper from "./Toast";
|
||||||
|
import showAboutSiteDialog from "./AboutSiteDialog";
|
||||||
import "../less/menu-btns-popup.less";
|
import "../less/menu-btns-popup.less";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
|
@ -4,9 +4,9 @@ import toImage from "../labs/html2image";
|
|||||||
import { ANIMATION_DURATION, IMAGE_URL_REG } from "../helpers/consts";
|
import { ANIMATION_DURATION, IMAGE_URL_REG } from "../helpers/consts";
|
||||||
import * as utils from "../helpers/utils";
|
import * as utils from "../helpers/utils";
|
||||||
import { showDialog } from "./Dialog";
|
import { showDialog } from "./Dialog";
|
||||||
import { formatMemoContent } from "./Memo";
|
|
||||||
import Only from "./common/OnlyWhen";
|
import Only from "./common/OnlyWhen";
|
||||||
import toastHelper from "./Toast";
|
import toastHelper from "./Toast";
|
||||||
|
import { formatMemoContent } from "./Memo";
|
||||||
import "../less/share-memo-image-dialog.less";
|
import "../less/share-memo-image-dialog.less";
|
||||||
|
|
||||||
interface Props extends DialogProps {
|
interface Props extends DialogProps {
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import { useAppSelector } from "../store";
|
import { useAppSelector } from "../store";
|
||||||
import * as utils from "../helpers/utils";
|
import * as utils from "../helpers/utils";
|
||||||
|
import { userService } from "../services";
|
||||||
import showDailyReviewDialog from "./DailyReviewDialog";
|
import showDailyReviewDialog from "./DailyReviewDialog";
|
||||||
import showSettingDialog from "./SettingDialog";
|
import showSettingDialog from "./SettingDialog";
|
||||||
import showArchivedMemoDialog from "./ArchivedMemoDialog";
|
import showArchivedMemoDialog from "./ArchivedMemoDialog";
|
||||||
@ -7,7 +8,6 @@ import UserBanner from "./UserBanner";
|
|||||||
import UsageHeatMap from "./UsageHeatMap";
|
import UsageHeatMap from "./UsageHeatMap";
|
||||||
import ShortcutList from "./ShortcutList";
|
import ShortcutList from "./ShortcutList";
|
||||||
import TagList from "./TagList";
|
import TagList from "./TagList";
|
||||||
import { userService } from "../services";
|
|
||||||
import "../less/siderbar.less";
|
import "../less/siderbar.less";
|
||||||
|
|
||||||
interface Props {}
|
interface Props {}
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
|
import * as utils from "../helpers/utils";
|
||||||
import { useAppSelector } from "../store";
|
import { useAppSelector } from "../store";
|
||||||
import { locationService, memoService, userService } from "../services";
|
import { locationService, memoService, userService } from "../services";
|
||||||
import useToggle from "../hooks/useToggle";
|
import useToggle from "../hooks/useToggle";
|
||||||
import Only from "./common/OnlyWhen";
|
import Only from "./common/OnlyWhen";
|
||||||
import * as utils from "../helpers/utils";
|
|
||||||
import "../less/tag-list.less";
|
import "../less/tag-list.less";
|
||||||
|
|
||||||
interface Tag {
|
interface Tag {
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
import * as api from "../helpers/api";
|
|
||||||
import { useCallback, useEffect, useState } from "react";
|
import { useCallback, useEffect, useState } from "react";
|
||||||
import MenuBtnsPopup from "./MenuBtnsPopup";
|
import * as api from "../helpers/api";
|
||||||
import { getUserIdFromPath } from "../services/userService";
|
import { getUserIdFromPath } from "../services/userService";
|
||||||
import { locationService } from "../services";
|
import { locationService } from "../services";
|
||||||
import toastHelper from "./Toast";
|
|
||||||
import { useAppSelector } from "../store";
|
import { useAppSelector } from "../store";
|
||||||
|
import toastHelper from "./Toast";
|
||||||
|
import MenuBtnsPopup from "./MenuBtnsPopup";
|
||||||
import "../less/user-banner.less";
|
import "../less/user-banner.less";
|
||||||
|
|
||||||
interface Props {}
|
interface Props {}
|
||||||
|
@ -1,4 +0,0 @@
|
|||||||
@import "./mixin.less";
|
|
||||||
|
|
||||||
#root {
|
|
||||||
}
|
|
@ -3,8 +3,8 @@ import { Provider } from "react-redux";
|
|||||||
import store from "./store";
|
import store from "./store";
|
||||||
import { updateStateWithLocation } from "./store/modules/location";
|
import { updateStateWithLocation } from "./store/modules/location";
|
||||||
import App from "./App";
|
import App from "./App";
|
||||||
import "./helpers/polyfill";
|
|
||||||
import "./less/global.less";
|
import "./less/global.less";
|
||||||
|
import "./helpers/polyfill";
|
||||||
import "./css/index.css";
|
import "./css/index.css";
|
||||||
|
|
||||||
const container = document.getElementById("root");
|
const container = document.getElementById("root");
|
||||||
|
Loading…
Reference in New Issue
Block a user