Skip to content

Commit

Permalink
add composable
Browse files Browse the repository at this point in the history
  • Loading branch information
s00d committed Aug 17, 2024
1 parent 3d29084 commit 0a400e3
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/runtime/01.plugin.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { RouteLocationNormalizedLoaded, RouteLocationRaw, Router } from 'vue-router'
import { defineNuxtPlugin, useRuntimeConfig } from '#app'
import { useRoute, useRouter } from '#imports'
import type { ModuleOptions } from '~/src/module'
import type { ModuleOptions } from '../module'

Check failure on line 4 in src/runtime/01.plugin.ts

View workflow job for this annotation

GitHub Actions / lint

`../module` type import should occur before import of `#app`

// Интерфейс для переводов, поддерживающий разные типы данных
interface Translations {
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/02.meta.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useHead, defineNuxtPlugin, useRuntimeConfig } from '#app'
import { useRoute } from '#imports'
import type { ModuleOptions } from '~/src/module'
import type { ModuleOptions } from '../module'

Check failure on line 3 in src/runtime/02.meta.ts

View workflow job for this annotation

GitHub Actions / lint

`../module` type import should occur before import of `#app`

interface State extends ModuleOptions {
rootDir: string
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/03.define.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { defineNuxtPlugin, useRuntimeConfig } from '#app'
import { useRoute, useRouter } from '#imports'
import type { ModuleOptions } from '~/src/module'
import type { ModuleOptions } from '../module'

Check failure on line 3 in src/runtime/03.define.ts

View workflow job for this annotation

GitHub Actions / lint

`../module` type import should occur before import of `#app`

interface State extends ModuleOptions {
rootDir: string
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/04.auto-detect.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { ModuleOptions } from '../module'
import { defineNuxtPlugin, useCookie } from '#app'
import type { ModuleOptions } from '~/src/module'
import { useRoute, useRouter } from '#imports'

interface State extends ModuleOptions {
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/composables/useI18n.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useNuxtApp } from '#imports'
import type { PluginsInjections } from '~/src/runtime/01.plugin'
import type { PluginsInjections } from '../01.plugin'

Check failure on line 2 in src/runtime/composables/useI18n.ts

View workflow job for this annotation

GitHub Actions / lint

`../01.plugin` type import should occur before import of `#imports`

export function useI18n(): PluginsInjections {
const nuxtApp = useNuxtApp()
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/server/middleware/i18n-redirect.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { defineEventHandler, sendRedirect } from 'h3'
import type { H3Event } from 'h3'
import type { Locale } from 'nuxt-i18n-micro'
import type { ModuleOptions } from '~/src/module'
import type { ModuleOptions } from '../../../module'
import { useRuntimeConfig } from '#imports'

export default defineEventHandler(async (event: H3Event) => {
Expand Down

0 comments on commit 0a400e3

Please sign in to comment.