chore: prettier-plugin-sort-imports

This commit is contained in:
Travis Fischer
2022-10-15 17:58:27 -04:00
parent c2024b78e9
commit 44026d9766
35 changed files with 487 additions and 274 deletions

View File

@@ -1,10 +1,12 @@
import * as React from 'react'
import { GetStaticProps } from 'next'
import { isDev, domain } from 'lib/config'
import { NotionPage } from 'components'
import { domain, isDev } from 'lib/config'
import { getSiteMap } from 'lib/get-site-map'
import { resolveNotionPage } from 'lib/resolve-notion-page'
import { PageProps, Params } from 'lib/types'
import { NotionPage } from 'components'
export const getStaticProps: GetStaticProps<PageProps, Params> = async (
context

View File

@@ -1,38 +1,32 @@
// global styles shared across the entire site
import 'styles/global.css'
import * as React from 'react'
import type { AppProps } from 'next/app'
import { useRouter } from 'next/router'
import * as Fathom from 'fathom-client'
// used for rendering equations (optional)
import 'katex/dist/katex.min.css'
import posthog from 'posthog-js'
// used for code syntax highlighting (optional)
import 'prismjs/themes/prism-coy.css'
// core styles shared by all of react-notion-x (required)
import 'react-notion-x/src/styles.css'
// used for rendering equations (optional)
import 'katex/dist/katex.min.css'
// used for code syntax highlighting (optional)
import 'prismjs/themes/prism-coy.css'
// this might be better for dark mode
// import 'prismjs/themes/prism-okaidia.css'
// global style overrides for notion
import 'styles/notion.css'
// global style overrides for prism theme (optional)
import 'styles/prism-theme.css'
import * as React from 'react'
import * as Fathom from 'fathom-client'
import type { AppProps } from 'next/app'
import { useRouter } from 'next/router'
import posthog from 'posthog-js'
import { bootstrap } from 'lib/bootstrap-client'
import {
isServer,
fathomId,
fathomConfig,
posthogId,
posthogConfig
fathomId,
isServer,
posthogConfig,
posthogId
} from 'lib/config'
import 'styles/global.css'
// this might be better for dark mode
// import 'prismjs/themes/prism-okaidia.css'
// global style overrides for notion
import 'styles/notion.css'
// global style overrides for prism theme (optional)
import 'styles/prism-theme.css'
if (!isServer) {
bootstrap()

View File

@@ -1,5 +1,6 @@
import * as React from 'react'
import Document, { Html, Head, Main, NextScript } from 'next/document'
import Document, { Head, Html, Main, NextScript } from 'next/document'
import { IconContext } from '@react-icons/all-files'
export default class MyDocument extends Document {

View File

@@ -1,18 +1,18 @@
import { NextApiRequest, NextApiResponse } from 'next'
import { PageBlock } from 'notion-types'
import {
getBlockTitle,
getBlockIcon,
getBlockTitle,
getPageProperty,
isUrl,
parsePageId
} from 'notion-utils'
import { PageBlock } from 'notion-types'
import { notion } from 'lib/notion-api'
import { mapImageUrl } from 'lib/map-image-url'
import { NotionPageInfo } from 'lib/types'
import * as libConfig from 'lib/config'
import { mapImageUrl } from 'lib/map-image-url'
import { notion } from 'lib/notion-api'
import { NotionPageInfo } from 'lib/types'
export default async (req: NextApiRequest, res: NextApiResponse) => {
if (req.method !== 'POST') {

View File

@@ -1,9 +1,10 @@
import * as React from 'react'
import { ImageResponse } from '@vercel/og'
import { NextRequest } from 'next/server'
import { ImageResponse } from '@vercel/og'
import { api, apiHost } from 'lib/config'
import { NotionPageInfo } from 'lib/types'
import { apiHost, api } from 'lib/config'
const interRegularFontP = fetch(
new URL('../../public/fonts/Inter-Regular.ttf', import.meta.url)

View File

@@ -1,17 +1,18 @@
import RSS from 'rss'
import type { GetServerSideProps } from 'next'
import { ExtendedRecordMap } from 'notion-types'
import {
getBlockParentPage,
getBlockTitle,
getPageProperty,
idToUuid
} from 'notion-utils'
import { ExtendedRecordMap } from 'notion-types'
import RSS from 'rss'
import * as config from 'lib/config'
import { getSiteMap } from 'lib/get-site-map'
import { getCanonicalPageUrl } from 'lib/map-page-url'
import { getSocialImageUrl } from 'lib/get-social-image-url'
import { getCanonicalPageUrl } from 'lib/map-page-url'
export const getServerSideProps: GetServerSideProps = async ({ req, res }) => {
if (req.method !== 'GET') {

View File

@@ -1,7 +1,9 @@
import * as React from 'react'
import { NotionPage } from 'components'
import { domain } from 'lib/config'
import { resolveNotionPage } from 'lib/resolve-notion-page'
import { NotionPage } from 'components'
export const getStaticProps = async () => {
try {

View File

@@ -1,4 +1,5 @@
import type { GetServerSideProps } from 'next'
import { host } from 'lib/config'
export const getServerSideProps: GetServerSideProps = async ({ req, res }) => {

View File

@@ -1,7 +1,8 @@
import type { GetServerSideProps } from 'next'
import type { SiteMap } from 'lib/types'
import { host } from 'lib/config'
import { getSiteMap } from 'lib/get-site-map'
import type { SiteMap } from 'lib/types'
export const getServerSideProps: GetServerSideProps = async ({ req, res }) => {
if (req.method !== 'GET') {