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
|
// 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 Link from 'next/link'
|
||||||
|
import { notFound } from 'next/navigation'
|
||||||
import { Fragment, Suspense } from 'react'
|
import { Fragment, Suspense } from 'react'
|
||||||
import { Author, affiliations, authors } from '../../db/data'
|
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 KonamiSnowfall from './KonamiSnowfall'
|
||||||
import Image from 'next/image'
|
import findDocumentsByAuthor from './findDocumentsByAuthor'
|
||||||
|
|
||||||
const zillaSlab = Zilla_Slab({ subsets: ['latin'], weight: ['500'] })
|
const zillaSlab = Zilla_Slab({ subsets: ['latin'], weight: ['500'] })
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
'use client'
|
'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 { nationalities } from '@/app/db/data'
|
||||||
import NextImage from 'next/image'
|
import NextImage from 'next/image'
|
||||||
|
import { Fragment, useEffect, useState } from 'react'
|
||||||
|
import Konami from 'react-konami-code'
|
||||||
|
import { Snowfall } from 'react-snowfall'
|
||||||
|
|
||||||
const NationalityDisplay = ({
|
const NationalityDisplay = ({
|
||||||
nationality,
|
nationality,
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import AuthorDisplay from './AuthorDisplay'
|
|
||||||
import { authors } from '@/app/db/data'
|
import { authors } from '@/app/db/data'
|
||||||
|
import AuthorDisplay from './AuthorDisplay'
|
||||||
|
|
||||||
export function generateStaticParams() {
|
export function generateStaticParams() {
|
||||||
const authorsList = Object.keys(authors)
|
const authorsList = Object.keys(authors)
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
import { Fragment } from 'react'
|
|
||||||
import Link from 'next/link'
|
|
||||||
import {
|
import {
|
||||||
reviewer,
|
|
||||||
authors as authorList,
|
authors as authorList,
|
||||||
|
reviewer,
|
||||||
topics as topicList,
|
topics as topicList,
|
||||||
} from '@/app/db/data'
|
} from '@/app/db/data'
|
||||||
|
import Link from 'next/link'
|
||||||
|
import { Fragment } from 'react'
|
||||||
|
|
||||||
const getRepo = (link: string) => {
|
const getRepo = (link: string) => {
|
||||||
if (link.includes('github.com')) {
|
if (link.includes('github.com')) {
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
// these variants of the data display components are designed for client side components
|
// these variants of the data display components are designed for client side components
|
||||||
// and fetch data asynchronously
|
// 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 { useSuspenseQuery } from '@tanstack/react-query'
|
||||||
import { Fragment } from 'react'
|
|
||||||
import Link from 'next/link'
|
import Link from 'next/link'
|
||||||
|
import { Fragment } from 'react'
|
||||||
|
|
||||||
export const Authors = ({
|
export const Authors = ({
|
||||||
authors,
|
authors,
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
import { Document } from '@/app/db/data'
|
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 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'] })
|
const zillaSlab = Zilla_Slab({ subsets: ['latin'], weight: ['500'] })
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
'use client'
|
'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 SearchBar from '@/app/components/SearchBar'
|
||||||
|
import { RxHamburgerMenu } from 'react-icons/rx'
|
||||||
|
import { create } from 'zustand'
|
||||||
|
import styles from './mobileMenu.module.css'
|
||||||
|
|
||||||
interface MobileMenuState {
|
interface MobileMenuState {
|
||||||
isOpen: boolean
|
isOpen: boolean
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import Link from 'next/link'
|
|
||||||
import { Inter, Zilla_Slab } from 'next/font/google'
|
import { Inter, Zilla_Slab } from 'next/font/google'
|
||||||
|
import Link from 'next/link'
|
||||||
|
|
||||||
const zillaSlab = Zilla_Slab({ weight: '600', subsets: ['latin'] })
|
const zillaSlab = Zilla_Slab({ weight: '600', subsets: ['latin'] })
|
||||||
const inter = Inter({ weight: ['400', '500'], 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 { documents, topics as topicsList } from '@/app/db/data'
|
||||||
|
import { epoch2datestring } from '@/app/utils/epoch2datestring'
|
||||||
import Link from 'next/link'
|
import Link from 'next/link'
|
||||||
|
|
||||||
const RandomDocs = (): React.ReactNode[] => {
|
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 { epoch2datestring } from '@/app/utils/epoch2datestring'
|
||||||
import { documents, topics as topicsList, Document } from '@/app/db/data'
|
|
||||||
import Link from 'next/link'
|
import Link from 'next/link'
|
||||||
|
|
||||||
function getThreeMostRecentDocuments(
|
function getThreeMostRecentDocuments(
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
'use client'
|
'use client'
|
||||||
import { Zilla_Slab } from 'next/font/google'
|
import { ItemBadge, Status } from '@/app/components/Badges'
|
||||||
import { epoch2datestring } from '@/app/utils/epoch2datestring'
|
|
||||||
import {
|
import {
|
||||||
|
Authors,
|
||||||
Code,
|
Code,
|
||||||
References,
|
References,
|
||||||
Topics,
|
|
||||||
Authors,
|
|
||||||
Reviewers,
|
Reviewers,
|
||||||
|
Topics,
|
||||||
} from '@/app/components/DataDisplay'
|
} 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 { loadDocument } from '@/app/db/loaders'
|
||||||
|
import { epoch2datestring } from '@/app/utils/epoch2datestring'
|
||||||
|
import generateHash from '@/app/utils/hash'
|
||||||
import { useSuspenseQuery } from '@tanstack/react-query'
|
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'] })
|
const zillaSlab = Zilla_Slab({ subsets: ['latin'], weight: ['500'] })
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
'use client'
|
'use client'
|
||||||
import { useState } from 'react'
|
|
||||||
import { Document } from '@/app/db/data'
|
import { Document } from '@/app/db/data'
|
||||||
import Link from 'next/link'
|
|
||||||
import { loadAuthors } from '@/app/db/loaders'
|
import { loadAuthors } from '@/app/db/loaders'
|
||||||
import { useSuspenseQuery } from '@tanstack/react-query'
|
|
||||||
import { epoch2date } from '@/app/utils/epoch2datestring'
|
import { epoch2date } from '@/app/utils/epoch2datestring'
|
||||||
import { toast } from 'react-toastify'
|
|
||||||
import generateHash from '@/app/utils/hash'
|
import generateHash from '@/app/utils/hash'
|
||||||
|
import { useSuspenseQuery } from '@tanstack/react-query'
|
||||||
|
import Link from 'next/link'
|
||||||
import QRCode from 'qrcode.react'
|
import QRCode from 'qrcode.react'
|
||||||
|
import { useState } from 'react'
|
||||||
|
import { toast } from 'react-toastify'
|
||||||
|
|
||||||
const VersionChooser = ({
|
const VersionChooser = ({
|
||||||
doc,
|
doc,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
'use client'
|
'use client'
|
||||||
import DocumentViewer from './DocumentViewer'
|
|
||||||
import ErrorBoundary from '@/app/utils/ErrorBoundary'
|
import ErrorBoundary from '@/app/utils/ErrorBoundary'
|
||||||
|
import DocumentViewer from './DocumentViewer'
|
||||||
|
|
||||||
export default function Page({
|
export default function Page({
|
||||||
params,
|
params,
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
import type { Metadata } from 'next'
|
import type { Metadata } from 'next'
|
||||||
import { Inter, Zilla_Slab } from 'next/font/google'
|
import { Inter, Zilla_Slab } from 'next/font/google'
|
||||||
import './globals.css'
|
import Image from 'next/legacy/image'
|
||||||
import styles from './home.module.css'
|
|
||||||
import Link from 'next/link'
|
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 { ToastContainer } from 'react-toastify'
|
||||||
import 'react-toastify/dist/ReactToastify.css'
|
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 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,
|
/* 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
|
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'
|
import Link from 'next/link'
|
||||||
|
|
||||||
export default function Page() {
|
export default function Page() {
|
||||||
return (
|
return (
|
||||||
<div className='content text-slate-800'>
|
<div className='content text-slate-800'>
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
import Link from 'next/link'
|
import Link from 'next/link'
|
||||||
import {
|
|
||||||
documents,
|
|
||||||
authors,
|
|
||||||
affiliations,
|
|
||||||
Author,
|
|
||||||
Affiliation,
|
|
||||||
} from './db/data'
|
|
||||||
import News from './components/News'
|
import News from './components/News'
|
||||||
import RandomDocs from './components/RandomDocs'
|
import RandomDocs from './components/RandomDocs'
|
||||||
import RecentDocuments from './components/RecentDocuments'
|
import RecentDocuments from './components/RecentDocuments'
|
||||||
|
import {
|
||||||
|
Affiliation,
|
||||||
|
Author,
|
||||||
|
affiliations,
|
||||||
|
authors,
|
||||||
|
documents,
|
||||||
|
} from './db/data'
|
||||||
|
|
||||||
function sortAuthorsByDocumentsPublished(authors: {
|
function sortAuthorsByDocumentsPublished(authors: {
|
||||||
[key: string]: Author
|
[key: string]: Author
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
'use client'
|
'use client'
|
||||||
|
|
||||||
import { useMemo } from 'react'
|
|
||||||
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
|
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
|
||||||
|
import { useMemo } from 'react'
|
||||||
|
|
||||||
type ProvidersProps = {
|
type ProvidersProps = {
|
||||||
children: React.ReactNode
|
children: React.ReactNode
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
'use client'
|
'use client'
|
||||||
import { useSearchParams, useRouter } from 'next/navigation'
|
import { ItemBadge, Status } from '@/app/components/Badges'
|
||||||
import { Zilla_Slab } from 'next/font/google'
|
import { Authors, Topics } from '@/app/components/DataDisplay'
|
||||||
import { Topics, Authors } from '@/app/components/DataDisplay'
|
import cardEffects from '@/app/styles/cardEffects.module.css'
|
||||||
import { Status, ItemBadge } from '@/app/components/Badges'
|
|
||||||
import { epoch2datestring } from '../utils/epoch2datestring'
|
|
||||||
import searchDocs, { CustomSearchResult } from '@/app/utils/searchDocs'
|
import searchDocs, { CustomSearchResult } from '@/app/utils/searchDocs'
|
||||||
import { useSuspenseQuery } from '@tanstack/react-query'
|
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 { 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'] })
|
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 { topics } from '@/app/db/data'
|
||||||
import { notFound } from 'next/navigation'
|
|
||||||
import string2hex from '@/app/utils/string2hex'
|
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'] })
|
const zillaSlab = Zilla_Slab({ subsets: ['latin'], weight: ['500'] })
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import React from 'react'
|
|
||||||
import { notFound } from 'next/navigation'
|
import { notFound } from 'next/navigation'
|
||||||
|
import React from 'react'
|
||||||
|
|
||||||
interface ErrorBoundaryProps {
|
interface ErrorBoundaryProps {
|
||||||
children: React.ReactNode
|
children: React.ReactNode
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import { documents, authors, affiliations, topics } from '@/app/db/data'
|
import { affiliations, authors, documents, topics } from '@/app/db/data'
|
||||||
import MiniSearch from 'minisearch'
|
|
||||||
import { CustomSearchResult } from './searchDocs'
|
|
||||||
import hash from './hash'
|
|
||||||
import { hash as fnv } from 'fnv-plus'
|
import { hash as fnv } from 'fnv-plus'
|
||||||
|
import MiniSearch from 'minisearch'
|
||||||
import { Document } from '../db/data'
|
import { Document } from '../db/data'
|
||||||
|
import hash from './hash'
|
||||||
|
import { CustomSearchResult } from './searchDocs'
|
||||||
|
|
||||||
const miniSearch = new MiniSearch({
|
const miniSearch = new MiniSearch({
|
||||||
fields: [
|
fields: [
|
||||||
|
|
Loading…
Reference in a new issue