chore: enforce authoritarian import ordering
Some random VSC prompt allows me to do this, still have no idea how to automate or reproduce this behavior
This commit is contained in:
parent
aed6bf88f5
commit
8b6a8f8abf
22 changed files with 70 additions and 69 deletions
|
@ -1,4 +1,4 @@
|
|||
import { Document, documents, authors } from '@/app/db/data'
|
||||
import { Document, authors, documents } from '@/app/db/data'
|
||||
|
||||
// Assuming the types Document, DocumentStatus, and reviewer are defined as provided in your question
|
||||
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
import DocumentCard from '@/app/components/DocumentCard'
|
||||
import cardEffects from '@/app/styles/cardEffects.module.css'
|
||||
import { Zilla_Slab } from 'next/font/google'
|
||||
import Image from 'next/image'
|
||||
import Link from 'next/link'
|
||||
import { notFound } from 'next/navigation'
|
||||
import { Fragment, Suspense } from 'react'
|
||||
import { Author, affiliations, authors } from '../../db/data'
|
||||
import { Zilla_Slab } from 'next/font/google'
|
||||
import { notFound } from 'next/navigation'
|
||||
import DocumentCard from '@/app/components/DocumentCard'
|
||||
import findDocumentsByAuthor from './findDocumentsByAuthor'
|
||||
import cardEffects from '@/app/styles/cardEffects.module.css'
|
||||
import KonamiSnowfall from './KonamiSnowfall'
|
||||
import Image from 'next/image'
|
||||
import findDocumentsByAuthor from './findDocumentsByAuthor'
|
||||
|
||||
const zillaSlab = Zilla_Slab({ subsets: ['latin'], weight: ['500'] })
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
'use client'
|
||||
import Konami from 'react-konami-code'
|
||||
import { Snowfall } from 'react-snowfall'
|
||||
import { Fragment, useEffect, useState } from 'react'
|
||||
import { nationalities } from '@/app/db/data'
|
||||
import NextImage from 'next/image'
|
||||
import { Fragment, useEffect, useState } from 'react'
|
||||
import Konami from 'react-konami-code'
|
||||
import { Snowfall } from 'react-snowfall'
|
||||
|
||||
const NationalityDisplay = ({
|
||||
nationality,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import AuthorDisplay from './AuthorDisplay'
|
||||
import { authors } from '@/app/db/data'
|
||||
import AuthorDisplay from './AuthorDisplay'
|
||||
|
||||
export function generateStaticParams() {
|
||||
const authorsList = Object.keys(authors)
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import { Fragment } from 'react'
|
||||
import Link from 'next/link'
|
||||
import {
|
||||
reviewer,
|
||||
authors as authorList,
|
||||
reviewer,
|
||||
topics as topicList,
|
||||
} from '@/app/db/data'
|
||||
import Link from 'next/link'
|
||||
import { Fragment } from 'react'
|
||||
|
||||
const getRepo = (link: string) => {
|
||||
if (link.includes('github.com')) {
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
// these variants of the data display components are designed for client side components
|
||||
// and fetch data asynchronously
|
||||
import { loadAllTopics, loadAllAuthors } from '@/app/db/loaders'
|
||||
import { loadAllAuthors, loadAllTopics } from '@/app/db/loaders'
|
||||
import { useSuspenseQuery } from '@tanstack/react-query'
|
||||
import { Fragment } from 'react'
|
||||
import Link from 'next/link'
|
||||
import { Fragment } from 'react'
|
||||
|
||||
export const Authors = ({
|
||||
authors,
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import { Document } from '@/app/db/data'
|
||||
import { Zilla_Slab } from 'next/font/google'
|
||||
import { Authors, Topics } from './DataDisplay'
|
||||
import { ItemBadge, Status } from './Badges'
|
||||
import { epoch2datestring } from '@/app/utils/epoch2datestring'
|
||||
import Link from 'next/link'
|
||||
import cardEffects from '@/app/styles/cardEffects.module.css'
|
||||
import { epoch2datestring } from '@/app/utils/epoch2datestring'
|
||||
import { Zilla_Slab } from 'next/font/google'
|
||||
import Link from 'next/link'
|
||||
import { ItemBadge, Status } from './Badges'
|
||||
import { Authors, Topics } from './DataDisplay'
|
||||
|
||||
const zillaSlab = Zilla_Slab({ subsets: ['latin'], weight: ['500'] })
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
'use client'
|
||||
import { RxHamburgerMenu } from 'react-icons/rx'
|
||||
import styles from './mobileMenu.module.css'
|
||||
import { create } from 'zustand'
|
||||
import SearchBar from '@/app/components/SearchBar'
|
||||
import { RxHamburgerMenu } from 'react-icons/rx'
|
||||
import { create } from 'zustand'
|
||||
import styles from './mobileMenu.module.css'
|
||||
|
||||
interface MobileMenuState {
|
||||
isOpen: boolean
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import Link from 'next/link'
|
||||
import { Inter, Zilla_Slab } from 'next/font/google'
|
||||
import Link from 'next/link'
|
||||
|
||||
const zillaSlab = Zilla_Slab({ weight: '600', subsets: ['latin'] })
|
||||
const inter = Inter({ weight: ['400', '500'], subsets: ['latin'] })
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { epoch2datestring } from '@/app/utils/epoch2datestring'
|
||||
import { documents, topics as topicsList } from '@/app/db/data'
|
||||
import { epoch2datestring } from '@/app/utils/epoch2datestring'
|
||||
import Link from 'next/link'
|
||||
|
||||
const RandomDocs = (): React.ReactNode[] => {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { Document, documents, topics as topicsList } from '@/app/db/data'
|
||||
import { epoch2datestring } from '@/app/utils/epoch2datestring'
|
||||
import { documents, topics as topicsList, Document } from '@/app/db/data'
|
||||
import Link from 'next/link'
|
||||
|
||||
function getThreeMostRecentDocuments(
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
'use client'
|
||||
import { Zilla_Slab } from 'next/font/google'
|
||||
import { epoch2datestring } from '@/app/utils/epoch2datestring'
|
||||
import { ItemBadge, Status } from '@/app/components/Badges'
|
||||
import {
|
||||
Authors,
|
||||
Code,
|
||||
References,
|
||||
Topics,
|
||||
Authors,
|
||||
Reviewers,
|
||||
Topics,
|
||||
} from '@/app/components/DataDisplay'
|
||||
import { ItemBadge, Status } from '@/app/components/Badges'
|
||||
import VersionChooser from './VersionChooser'
|
||||
import generateHash from '@/app/utils/hash'
|
||||
import { Suspense } from 'react'
|
||||
import { loadDocument } from '@/app/db/loaders'
|
||||
import { epoch2datestring } from '@/app/utils/epoch2datestring'
|
||||
import generateHash from '@/app/utils/hash'
|
||||
import { useSuspenseQuery } from '@tanstack/react-query'
|
||||
import { Zilla_Slab } from 'next/font/google'
|
||||
import { Suspense } from 'react'
|
||||
import VersionChooser from './VersionChooser'
|
||||
|
||||
const zillaSlab = Zilla_Slab({ subsets: ['latin'], weight: ['500'] })
|
||||
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
'use client'
|
||||
import { useState } from 'react'
|
||||
import { Document } from '@/app/db/data'
|
||||
import Link from 'next/link'
|
||||
import { loadAuthors } from '@/app/db/loaders'
|
||||
import { useSuspenseQuery } from '@tanstack/react-query'
|
||||
import { epoch2date } from '@/app/utils/epoch2datestring'
|
||||
import { toast } from 'react-toastify'
|
||||
import generateHash from '@/app/utils/hash'
|
||||
import { useSuspenseQuery } from '@tanstack/react-query'
|
||||
import Link from 'next/link'
|
||||
import QRCode from 'qrcode.react'
|
||||
import { useState } from 'react'
|
||||
import { toast } from 'react-toastify'
|
||||
|
||||
const VersionChooser = ({
|
||||
doc,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
'use client'
|
||||
import DocumentViewer from './DocumentViewer'
|
||||
import ErrorBoundary from '@/app/utils/ErrorBoundary'
|
||||
import DocumentViewer from './DocumentViewer'
|
||||
|
||||
export default function Page({
|
||||
params,
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
import type { Metadata } from 'next'
|
||||
import { Inter, Zilla_Slab } from 'next/font/google'
|
||||
import './globals.css'
|
||||
import styles from './home.module.css'
|
||||
import Image from 'next/legacy/image'
|
||||
import Link from 'next/link'
|
||||
import SearchBar from './components/SearchBar'
|
||||
import Container from './container/Container'
|
||||
import MobileMenu from './components/MobileMenu'
|
||||
import { ToastContainer } from 'react-toastify'
|
||||
import 'react-toastify/dist/ReactToastify.css'
|
||||
import MobileMenu from './components/MobileMenu'
|
||||
import SearchBar from './components/SearchBar'
|
||||
import Container from './container/Container'
|
||||
import './globals.css'
|
||||
import styles from './home.module.css'
|
||||
import Providers from './providers'
|
||||
import Image from 'next/legacy/image'
|
||||
|
||||
/* The default font is Inter. If you want to use Zilla Slab (or any other Google Font,
|
||||
which are pre-provided by Next.js in the 'next/font/google' module), you need to
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import Link from 'next/link'
|
||||
|
||||
export default function Page() {
|
||||
return (
|
||||
<div className='content text-slate-800'>
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
import Link from 'next/link'
|
||||
import {
|
||||
documents,
|
||||
authors,
|
||||
affiliations,
|
||||
Author,
|
||||
Affiliation,
|
||||
} from './db/data'
|
||||
import News from './components/News'
|
||||
import RandomDocs from './components/RandomDocs'
|
||||
import RecentDocuments from './components/RecentDocuments'
|
||||
import {
|
||||
Affiliation,
|
||||
Author,
|
||||
affiliations,
|
||||
authors,
|
||||
documents,
|
||||
} from './db/data'
|
||||
|
||||
function sortAuthorsByDocumentsPublished(authors: {
|
||||
[key: string]: Author
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
'use client'
|
||||
|
||||
import { useMemo } from 'react'
|
||||
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
|
||||
import { useMemo } from 'react'
|
||||
|
||||
type ProvidersProps = {
|
||||
children: React.ReactNode
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
'use client'
|
||||
import { useSearchParams, useRouter } from 'next/navigation'
|
||||
import { Zilla_Slab } from 'next/font/google'
|
||||
import { Topics, Authors } from '@/app/components/DataDisplay'
|
||||
import { Status, ItemBadge } from '@/app/components/Badges'
|
||||
import { epoch2datestring } from '../utils/epoch2datestring'
|
||||
import { ItemBadge, Status } from '@/app/components/Badges'
|
||||
import { Authors, Topics } from '@/app/components/DataDisplay'
|
||||
import cardEffects from '@/app/styles/cardEffects.module.css'
|
||||
import searchDocs, { CustomSearchResult } from '@/app/utils/searchDocs'
|
||||
import { useSuspenseQuery } from '@tanstack/react-query'
|
||||
import cardEffects from '@/app/styles/cardEffects.module.css'
|
||||
import { toast } from 'react-toastify'
|
||||
import { useEffect } from 'react'
|
||||
import { hash as fnv } from 'fnv-plus'
|
||||
import { Zilla_Slab } from 'next/font/google'
|
||||
import { useRouter, useSearchParams } from 'next/navigation'
|
||||
import { useEffect } from 'react'
|
||||
import { toast } from 'react-toastify'
|
||||
import { epoch2datestring } from '../utils/epoch2datestring'
|
||||
|
||||
const zillaSlab = Zilla_Slab({ subsets: ['latin'], weight: ['500', '700'] })
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { Zilla_Slab } from 'next/font/google'
|
||||
import { topics } from '@/app/db/data'
|
||||
import { notFound } from 'next/navigation'
|
||||
import string2hex from '@/app/utils/string2hex'
|
||||
import { Zilla_Slab } from 'next/font/google'
|
||||
import { notFound } from 'next/navigation'
|
||||
|
||||
const zillaSlab = Zilla_Slab({ subsets: ['latin'], weight: ['500'] })
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import React from 'react'
|
||||
import { notFound } from 'next/navigation'
|
||||
import React from 'react'
|
||||
|
||||
interface ErrorBoundaryProps {
|
||||
children: React.ReactNode
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import { documents, authors, affiliations, topics } from '@/app/db/data'
|
||||
import MiniSearch from 'minisearch'
|
||||
import { CustomSearchResult } from './searchDocs'
|
||||
import hash from './hash'
|
||||
import { affiliations, authors, documents, topics } from '@/app/db/data'
|
||||
import { hash as fnv } from 'fnv-plus'
|
||||
import MiniSearch from 'minisearch'
|
||||
import { Document } from '../db/data'
|
||||
import hash from './hash'
|
||||
import { CustomSearchResult } from './searchDocs'
|
||||
|
||||
const miniSearch = new MiniSearch({
|
||||
fields: [
|
||||
|
|
Loading…
Reference in a new issue