Skip to content

Commit

Permalink
chore: order imports
Browse files Browse the repository at this point in the history
  • Loading branch information
KagamiChan committed Sep 30, 2024
1 parent 7581371 commit 11e2c8c
Show file tree
Hide file tree
Showing 21 changed files with 43 additions and 30 deletions.
7 changes: 7 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@ const config = {
},
},
],
'import/order': [
'error',
{
'newlines-between': 'always',
alphabetize: { order: 'asc', caseInsensitive: true },
},
],
},
}
module.exports = config
2 changes: 1 addition & 1 deletion playwright.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { defineConfig } from 'next/experimental/testmode/playwright.js'
import { devices } from '@playwright/test'
import { defineConfig } from 'next/experimental/testmode/playwright.js'

/**
* See https://playwright.dev/docs/test-configuration.
Expand Down
2 changes: 1 addition & 1 deletion specs/dist.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { test } from 'next/experimental/testmode/playwright.js'
import { expect } from '@playwright/test'
import { test } from 'next/experimental/testmode/playwright.js'

test.describe('dist', () => {
test('/dist/poi-10.9.2-arm64-win.7z', async ({ page, next }) => {
Expand Down
2 changes: 1 addition & 1 deletion specs/fcd.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { test } from 'next/experimental/testmode/playwright.js'
import { expect } from '@playwright/test'
import { test } from 'next/experimental/testmode/playwright.js'

const mockMetaJson = [
{ name: 'map', version: '1000/01/01/01' },
Expand Down
5 changes: 3 additions & 2 deletions src/app/(api)/dist/[filename]/route.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { notFound } from 'next/navigation'
import { reverseFetch } from '~/utils/reverse-fetch'
import { fetchPoiVersions } from '~/utils/fetch-poi-versions'

import { fetchPoiVersions } from '~/lib/fetch-poi-versions'
import { reverseFetch } from '~/lib/reverse-fetch'

export const runtime = 'edge'

Expand Down
3 changes: 2 additions & 1 deletion src/app/(api)/fcd/[filename]/route.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { notFound } from 'next/navigation'
import { reverseFetch } from '~/utils/reverse-fetch'

import { reverseFetch } from '~/lib/reverse-fetch'

export const runtime = 'edge'

Expand Down
3 changes: 2 additions & 1 deletion src/app/(api)/update/[filename]/route.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { notFound } from 'next/navigation'
import { reverseFetch } from '~/utils/reverse-fetch'

import { reverseFetch } from '~/lib/reverse-fetch'

export const runtime = 'edge'

Expand Down
5 changes: 3 additions & 2 deletions src/components/i18n-provider.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
'use client'

import { I18nextProvider } from 'react-i18next'
import { initTranslations } from '~/i18n'
import { type Resource, createInstance } from 'i18next'
import { type FC, type PropsWithChildren } from 'react'
import { I18nextProvider } from 'react-i18next'

import { initTranslations } from '~/i18n'

interface I18nProviderProps extends PropsWithChildren {
locale: string
Expand Down
4 changes: 2 additions & 2 deletions src/components/language-chooser.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
'use client'

import { GlobeIcon } from '@radix-ui/react-icons'
import { useRouter, usePathname } from 'next/navigation'
import { useCallback } from 'react'
import { useTranslation } from 'react-i18next'

import { i18nConfig } from '~/i18n-config'
import { GlobeIcon } from '@radix-ui/react-icons'
import { Button } from '~/components/ui/button'
import {
DropdownMenu,
Expand All @@ -14,6 +13,7 @@ import {
DropdownMenuRadioItem,
DropdownMenuTrigger,
} from '~/components/ui/dropdown-menu'
import { i18nConfig } from '~/i18n-config'

export const LanguageChooser = () => {
const { t, i18n } = useTranslation()
Expand Down
2 changes: 1 addition & 1 deletion src/components/ui/button.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react'
import { Slot } from '@radix-ui/react-slot'
import { cva, type VariantProps } from 'class-variance-authority'
import * as React from 'react'

import { cn } from '~/lib/utils'

Expand Down
2 changes: 1 addition & 1 deletion src/components/ui/dropdown-menu.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
'use client'

import * as React from 'react'
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu'
import {
CheckIcon,
ChevronRightIcon,
DotFilledIcon,
} from '@radix-ui/react-icons'
import * as React from 'react'

import { cn } from '~/lib/utils'

Expand Down
2 changes: 1 addition & 1 deletion src/components/ui/navigation-menu.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from 'react'
import { ChevronDownIcon } from '@radix-ui/react-icons'
import * as NavigationMenuPrimitive from '@radix-ui/react-navigation-menu'
import { cva } from 'class-variance-authority'
import * as React from 'react'

import { cn } from '~/lib/utils'

Expand Down
2 changes: 1 addition & 1 deletion src/components/ui/select.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
'use client'

import * as React from 'react'
import {
CaretSortIcon,
CheckIcon,
ChevronDownIcon,
ChevronUpIcon,
} from '@radix-ui/react-icons'
import * as SelectPrimitive from '@radix-ui/react-select'
import * as React from 'react'

import { cn } from '~/lib/utils'

Expand Down
5 changes: 3 additions & 2 deletions src/i18n.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { type Resource, createInstance, type i18n } from 'i18next'
import { initReactI18next } from 'react-i18next/initReactI18next'
import resourcesToBackend from 'i18next-resources-to-backend'
import { i18nConfig } from './i18n-config'
import { initReactI18next } from 'react-i18next/initReactI18next'

import { i18nConfig } from '~/i18n-config'

export const initTranslations = async (
locale: string,
Expand Down
4 changes: 2 additions & 2 deletions src/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
"Reload": "Reload",
"Downloads": "Downloads",
"no-content": "We're working on it, please check later.",
"Return to home": "Return to home",
"Explore": "Explore",
"Plugins": "Plugins",
"System": "System"
"System": "System",
"Return to homepage": "Return to home page"
}
4 changes: 2 additions & 2 deletions src/locales/fr/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@
"Reload": "Rechargez",
"Downloads": "Téléchargements",
"no-content": "Nous y travaillons, veuillez vérifier plus tard.",
"Return to home": "Retourner à l'accueil",
"Explore": "Explorer",
"Plugins": "Plugins",
"other-versions": "Consultez la liste complète",
"System": "Système"
"System": "Système",
"Return to homepage": "Retour à la page d'accueil"
}
4 changes: 2 additions & 2 deletions src/locales/ja/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@
"Reload": "再起動",
"Downloads": "ダウンロード",
"no-content": "作業中です。後で確認してください。",
"Return to home": "ホームに戻る",
"System": "システム"
"System": "システム",
"Return to homepage": "ホームペイジに戻る"
}
4 changes: 2 additions & 2 deletions src/locales/ko/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"Reload": "새로고침",
"Downloads": "다운로드",
"no-content": "현재 공사 중입니다. 다음에 다시 방문해 주세요!",
"Return to home": "홈으로 돌아가기",
"Plugins": "플러그인",
"System": "체계"
"System": "체계",
"Return to homepage": "홈페이지로 돌아가기"
}
4 changes: 2 additions & 2 deletions src/locales/zh-Hans/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@
"Reload": "重新载入",
"Downloads": "下载列表",
"no-content": "我们正在努力,请稍后再来。",
"Return to home": "返回首页",
"System": "系统"
"System": "系统",
"Return to homepage": "返回首页"
}
4 changes: 2 additions & 2 deletions src/locales/zh-Hant/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@
"Reload": "重新載入",
"Downloads": "下載列表",
"no-content": "我們正在努力,請稍後再來。",
"Return to home": "回到首頁",
"System": "系統"
"System": "系統",
"Return to homepage": "返回首頁"
}
3 changes: 2 additions & 1 deletion src/middleware.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { type NextRequest } from 'next/server'
import { i18nRouter } from 'next-i18n-router'

import { i18nConfig } from './i18n-config'
import { type NextRequest } from 'next/server'

export function middleware(request: NextRequest) {
return i18nRouter(request, i18nConfig)
Expand Down

0 comments on commit 11e2c8c

Please sign in to comment.