mirror of
https://github.com/gethomepage/homepage.git
synced 2026-01-04 06:12:12 +08:00
Chore: add organize imports to pre-commit (#5104)
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
/* eslint-disable react/jsx-props-no-spreading */
|
||||
import { SWRConfig } from "swr";
|
||||
import { appWithTranslation } from "next-i18next";
|
||||
import Head from "next/head";
|
||||
import "styles/globals.css";
|
||||
import "styles/theme.css";
|
||||
import "styles/manrope.css";
|
||||
import "styles/theme.css";
|
||||
import { SWRConfig } from "swr";
|
||||
import { ColorProvider } from "utils/contexts/color";
|
||||
import { ThemeProvider } from "utils/contexts/theme";
|
||||
import { SettingsProvider } from "utils/contexts/settings";
|
||||
import { TabProvider } from "utils/contexts/tab";
|
||||
import { ThemeProvider } from "utils/contexts/theme";
|
||||
|
||||
import nextI18nextConfig from "../../next-i18next.config";
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Html, Head, Main, NextScript } from "next/document";
|
||||
import { Head, Html, Main, NextScript } from "next/document";
|
||||
|
||||
export default function Document() {
|
||||
return (
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import path from "path";
|
||||
import fs from "fs";
|
||||
import path from "path";
|
||||
|
||||
import { CONF_DIR } from "utils/config/config";
|
||||
import createLogger from "utils/logger";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { join } from "path";
|
||||
import { createHash } from "crypto";
|
||||
import { readFileSync } from "fs";
|
||||
import { join } from "path";
|
||||
|
||||
import checkAndCopyConfig, { CONF_DIR } from "utils/config/config";
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { cachedRequest } from "utils/proxy/http";
|
||||
import createLogger from "utils/logger";
|
||||
import { cachedRequest } from "utils/proxy/http";
|
||||
|
||||
const logger = createLogger("releases");
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { searchProviders } from "components/widgets/search/search";
|
||||
|
||||
import { getSettings } from "utils/config/config";
|
||||
import { cachedRequest } from "utils/proxy/http";
|
||||
import { widgetsFromConfig } from "utils/config/widget-helpers";
|
||||
import { cachedRequest } from "utils/proxy/http";
|
||||
|
||||
export default async function handler(req, res) {
|
||||
const { query, providerName } = req.query;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { formatApiCall } from "utils/proxy/api-helpers";
|
||||
import createLogger from "utils/logger";
|
||||
import genericProxyHandler from "utils/proxy/handlers/generic";
|
||||
import widgets from "widgets/widgets";
|
||||
import calendarProxyHandler from "widgets/calendar/proxy";
|
||||
import getServiceWidget from "utils/config/service-helpers";
|
||||
import createLogger from "utils/logger";
|
||||
import { formatApiCall } from "utils/proxy/api-helpers";
|
||||
import genericProxyHandler from "utils/proxy/handlers/generic";
|
||||
import calendarProxyHandler from "widgets/calendar/proxy";
|
||||
import widgets from "widgets/widgets";
|
||||
|
||||
const logger = createLogger("servicesProxy");
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { httpProxy } from "utils/proxy/http";
|
||||
import createLogger from "utils/logger";
|
||||
import { getPrivateWidgetOptions } from "utils/config/widget-helpers";
|
||||
import createLogger from "utils/logger";
|
||||
import { httpProxy } from "utils/proxy/http";
|
||||
|
||||
const logger = createLogger("glances");
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { httpProxy } from "../../../utils/proxy/http";
|
||||
import createLogger from "../../../utils/logger";
|
||||
import { getSettings } from "../../../utils/config/config";
|
||||
import createLogger from "../../../utils/logger";
|
||||
import { httpProxy } from "../../../utils/proxy/http";
|
||||
|
||||
const logger = createLogger("longhorn");
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { cachedRequest } from "utils/proxy/http";
|
||||
import { getSettings } from "utils/config/config";
|
||||
import { getPrivateWidgetOptions } from "utils/config/widget-helpers";
|
||||
import { cachedRequest } from "utils/proxy/http";
|
||||
|
||||
export default async function handler(req, res) {
|
||||
const { latitude, longitude, units, provider, cache, lang, index } = req.query;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { cachedRequest } from "utils/proxy/http";
|
||||
import { getSettings } from "utils/config/config";
|
||||
import createLogger from "utils/logger";
|
||||
import { cachedRequest } from "utils/proxy/http";
|
||||
|
||||
const logger = createLogger("stocks");
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { cachedRequest } from "utils/proxy/http";
|
||||
import { getSettings } from "utils/config/config";
|
||||
import { getPrivateWidgetOptions } from "utils/config/widget-helpers";
|
||||
import { cachedRequest } from "utils/proxy/http";
|
||||
|
||||
export default async function handler(req, res) {
|
||||
const { latitude, longitude, provider, cache, lang, index } = req.query;
|
||||
|
||||
@@ -1,31 +1,31 @@
|
||||
/* eslint-disable react/no-array-index-key */
|
||||
import useSWR, { SWRConfig } from "swr";
|
||||
import Head from "next/head";
|
||||
import Script from "next/script";
|
||||
import dynamic from "next/dynamic";
|
||||
import classNames from "classnames";
|
||||
import { useTranslation } from "next-i18next";
|
||||
import { useEffect, useContext, useState, useMemo } from "react";
|
||||
import { BiError } from "react-icons/bi";
|
||||
import { serverSideTranslations } from "next-i18next/serverSideTranslations";
|
||||
import { useRouter } from "next/router";
|
||||
import Tab, { slugifyAndEncode } from "components/tab";
|
||||
import ServicesGroup from "components/services/group";
|
||||
import BookmarksGroup from "components/bookmarks/group";
|
||||
import Widget from "components/widgets/widget";
|
||||
import Revalidate from "components/toggles/revalidate";
|
||||
import { ColorContext } from "utils/contexts/color";
|
||||
import { ThemeContext } from "utils/contexts/theme";
|
||||
import { SettingsContext } from "utils/contexts/settings";
|
||||
import { TabContext } from "utils/contexts/tab";
|
||||
import ErrorBoundary from "components/errorboundry";
|
||||
import QuickLaunch from "components/quicklaunch";
|
||||
import ServicesGroup from "components/services/group";
|
||||
import Tab, { slugifyAndEncode } from "components/tab";
|
||||
import Revalidate from "components/toggles/revalidate";
|
||||
import Widget from "components/widgets/widget";
|
||||
import { useTranslation } from "next-i18next";
|
||||
import { serverSideTranslations } from "next-i18next/serverSideTranslations";
|
||||
import dynamic from "next/dynamic";
|
||||
import Head from "next/head";
|
||||
import { useRouter } from "next/router";
|
||||
import Script from "next/script";
|
||||
import { useContext, useEffect, useMemo, useState } from "react";
|
||||
import { BiError } from "react-icons/bi";
|
||||
import useSWR, { SWRConfig } from "swr";
|
||||
import { ColorContext } from "utils/contexts/color";
|
||||
import { SettingsContext } from "utils/contexts/settings";
|
||||
import { TabContext } from "utils/contexts/tab";
|
||||
import { ThemeContext } from "utils/contexts/theme";
|
||||
|
||||
import { bookmarksResponse, servicesResponse, widgetsResponse } from "utils/config/api-response";
|
||||
import themes from "utils/styles/themes";
|
||||
import { getSettings } from "utils/config/config";
|
||||
import useWindowFocus from "utils/hooks/window-focus";
|
||||
import createLogger from "utils/logger";
|
||||
import themes from "utils/styles/themes";
|
||||
|
||||
const ThemeToggle = dynamic(() => import("components/toggles/theme"), {
|
||||
ssr: false,
|
||||
|
||||
Reference in New Issue
Block a user