Skip to content

Commit

Permalink
chore: 🤖 Normalize all import lines to be multi-line
Browse files Browse the repository at this point in the history
  • Loading branch information
renoirb committed Oct 30, 2024
1 parent b1e4276 commit 347ce78
Show file tree
Hide file tree
Showing 36 changed files with 233 additions and 56 deletions.
9 changes: 7 additions & 2 deletions components/AppArticleTags.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,17 @@
<script lang="ts">
import Vue, { PropOptions } from 'vue'
import {
INuxtContentResult,
Labeler,
abbreviatize,
isNuxtContentResult,
/* */
} from '~/lib'
import type {
INuxtContentResult,
Labeler,
ILabeler,
abbreviatize,
IAbbreviatize,
/* */
} from '~/lib'
export interface Data {
labeler: ILabeler
Expand Down
7 changes: 5 additions & 2 deletions components/AppBreadCrumb.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@
import { VNode } from 'vue'
import { Route } from 'vue-router'
import { defineComponent } from '@nuxtjs/composition-api'
import { routeToCrumbs, typeGuardIsRoute } from '~/lib'
import {
routeToCrumbs,
typeGuardIsRoute,
/* */
} from '~/lib'
export interface Props {
route: Route
}
Expand Down
5 changes: 4 additions & 1 deletion components/AppCodeHighlighter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@

<script lang="ts">
import Vue from 'vue'
import { isPrismSupportedLanguage } from '~/lib'
import {
isPrismSupportedLanguage,
/* */
} from '~/lib'
export interface Data {}
export interface Methods {}
export interface Computed {
Expand Down
11 changes: 10 additions & 1 deletion components/AppMonthsInYear.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,15 @@

<script lang="ts">
import Vue, { PropOptions } from 'vue'
import { getMonthNames, IMonthNames, isValidYear } from '~/lib'
import {
getMonthNames,
isValidYear,
/* */
} from '~/lib'
import type {
IMonthNames,
/* */
} from '~/lib'
export interface Props {
year: string
currentMonth: string
Expand All @@ -34,6 +42,7 @@
export interface Computed {}
export interface Data {
months: IMonthNames
locale: string
}
export default Vue.extend<Data, Methods, Computed, Props>({
props: {
Expand Down
1 change: 1 addition & 0 deletions components/blog/BlogListModelByYear.vue
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
abbreviatize,
IAbbreviatize,
INuxtContentIndexResultByYears,
/* */
} from '~/lib'
export interface Data {}
export interface Methods {
Expand Down
10 changes: 9 additions & 1 deletion components/global/AppAlertBox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,15 @@

<script lang="ts">
import Vue, { PropOptions } from 'vue'
import { abbreviatize, IAbbreviatize, IAlertType } from '~/lib'
import {
abbreviatize,
/* */
} from '~/lib'
import type {
IAbbreviatize,
IAlertType,
/* */
} from '~/lib'
export interface Data {
messageTextContent: string
titleTextContent: string
Expand Down
7 changes: 6 additions & 1 deletion components/global/AppContentDate.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,16 @@

<script lang="ts">
import Vue, { PropOptions } from 'vue'
import type { INuxtContentResult, ITemporalFormat } from '~/lib'
import {
getPrettyfiedTemporalDate,
formatTemporal,
isNuxtContentResult,
/* */
} from '~/lib'
import type {
INuxtContentResult,
ITemporalFormat,
/* */
} from '~/lib'
export interface Data {}
export interface Methods {
Expand Down
5 changes: 4 additions & 1 deletion components/global/AppFooter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,10 @@

<script lang="ts">
import Vue from 'vue'
import { IAppIdentity } from '~/lib'
import type {
IAppIdentity,
/* */
} from '~/lib'
export interface Data {}
export interface Methods {}
export interface Computed {}
Expand Down
9 changes: 8 additions & 1 deletion components/global/AppHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,14 @@

<script lang="ts">
import Vue from 'vue'
import { IAppHeaderNavItems, appHeaderNav } from '~/lib'
import {
appHeaderNav,
/* */
} from '~/lib'
import type {
IAppHeaderNavItems,
/* */
} from '~/lib'
export interface Data {
nav: IAppHeaderNavItems[]
}
Expand Down
1 change: 1 addition & 0 deletions components/global/AppImage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
FALLBACK_BLANK_IMAGE,
IAbbreviatize,
PUBLIC_SITE_ASSETS_ORIGIN,
/* */
} from '~/lib'
// const images = require.context('~assets/', false, /\.(?:png|jpg|svg|gif)$/i)
const RE_WEBPACK_ASSETS = /^[@~]\/assets\//
Expand Down
5 changes: 4 additions & 1 deletion components/global/AppPrevNext.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@

<script lang="ts">
import Vue, { PropOptions } from 'vue'
import { INuxtContentPrevNext } from '~/lib'
import {
INuxtContentPrevNext,
/* */
} from '~/lib'
export interface Data {}
export interface Methods {}
export interface Computed {}
Expand Down
5 changes: 4 additions & 1 deletion components/global/AppSideBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,10 @@

<script lang="ts">
import Vue from 'vue'
import { IAppHeaderNavItems } from '~/lib'
import type {
IAppHeaderNavItems,
/* */
} from '~/lib'
export interface Data {
appTitle: string
isOpen: boolean
Expand Down
3 changes: 2 additions & 1 deletion components/global/AppVeryOldArticle.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import Vue, { PropOptions } from 'vue'
import AppAlertBox, {
Data as IAppAlertBoxData,
/* */
} from '@/components/global/AppAlertBox.vue'
import {
FALLBACK_LANG_CODE,
Expand All @@ -10,8 +11,8 @@
YEAR_CONSIDERED_OLD,
IAlertType,
IFrontMatterPreambleInnerDocument,
/* */
} from '~/lib'
export interface Data extends IAppAlertBoxData {
alertType: IAlertType
}
Expand Down
5 changes: 4 additions & 1 deletion lib/consts.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import { trimText } from './runtime'
import {
trimText,
/* */
} from './runtime'

/**
* This file is imported by any part of the project build
Expand Down
10 changes: 8 additions & 2 deletions lib/model/content/break-into-years.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
import { getPrettyfiedTemporalDate } from '../date'
import { INuxtContentIndexResult } from './model'
import {
getPrettyfiedTemporalDate,
/* */
} from '../date'
import {
INuxtContentIndexResult,
/* */
} from './model'

export type INuxtContentIndexResultByYears = [
number,
Expand Down
11 changes: 9 additions & 2 deletions lib/model/content/front-matter-inner-document.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
import { strict as assert } from 'assert'
import { abbreviatize } from '../..'
import {
abbreviatize,
/* */
} from '../..'
import type {
INuxtContentParsedDocument,
VueNodeTreeType,
VueNodeTree,
VueNodeTreeNonRoot,
VueNodeTag,
/* */
} from '../../types'
import type { contentFunc } from './imports'
import type {
contentFunc,
/* */
} from './imports'

export interface IFrontMatterInnerDocument {
/**
Expand Down
6 changes: 5 additions & 1 deletion lib/model/content/imports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@ import type {
contentFunc as baseContentFunc,
NuxtContentInstance,
Result,
/* */
} from '@nuxt/content'
import type { Context as BaseContext } from '@nuxt/types'
import type {
Context as BaseContext,
/* */
} from '@nuxt/types'

/**
* Nuxt content function typings to help (Renoir’s) memory.
Expand Down
12 changes: 9 additions & 3 deletions lib/model/content/model.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,25 @@
import type { IPrettyfiedTemporalDate } from '../date'
import {
ITaxonomyHuman,
ITaxonomyItem,
toTaxonomyItemCollection,
extractTaxonomyHuman,
hydrateTaxonomyCollection,
toTaxonomyItemCollection,
/* */
} from '../taxonomy'
import type {
ITaxonomyHuman,
ITaxonomyItem,
/* */
} from '../taxonomy'
import type {
Context,
INuxtContentInstance,
IResult,
/* */
} from './imports'
import type {
IFrontMatterPreambleInnerDocument,
IFrontMatterCoverImageInnerDocument,
/* */
} from './front-matter-inner-document'

export type INuxtContentResolver = (
Expand Down
11 changes: 9 additions & 2 deletions lib/model/content/parser.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
import type { NuxtOptions } from '@nuxt/types'
import type { INuxtContentResult, IBaseNuxtContentResult } from './model'
import type {
NuxtOptions,
/* */
} from '@nuxt/types'
import type {
INuxtContentResult,
IBaseNuxtContentResult,
/* */
} from './model'

type INuxtContentParser = Record<
'toJSON',
Expand Down
16 changes: 13 additions & 3 deletions lib/model/date.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
import { Temporal } from '@js-temporal/polyfill'
import { FALLBACK_LOCALE, FALLBACK_CALENDAR_NAME } from '../consts'
import { extractYearFromDateString } from './content'
import {
Temporal,
/* */
} from '@js-temporal/polyfill'
import {
FALLBACK_LOCALE,
FALLBACK_CALENDAR_NAME,
/* */
} from '../consts'
import {
extractYearFromDateString,
/* */
} from './content'

const CALENDAR = [
'buddhist',
Expand Down
15 changes: 12 additions & 3 deletions lib/model/page-title.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
import { Context } from '@nuxt/types'
import { RE_FULL_PATH_BLOG_INDEX } from '../consts'
import { transformToPrettyfiedTemporalDate } from './date'
import {
Context,
/* */
} from '@nuxt/types'
import {
RE_FULL_PATH_BLOG_INDEX,
/* */
} from '../consts'
import {
transformToPrettyfiedTemporalDate,
/* */
} from './date'

export const pageTitleForBlogIndex = (
route: Context['route'],
Expand Down
10 changes: 8 additions & 2 deletions lib/model/tag.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
import type { INuxtContentResult } from '../model'
import { toTaxonomyItemCollection } from './taxonomy'
import {
toTaxonomyItemCollection,
/* */
} from './taxonomy'
import type {
INuxtContentResult,
/* */
} from '../model'

export const extractFrontMatterTagsAndNormalize = (
taxonomyPredicateKey: string,
Expand Down
10 changes: 8 additions & 2 deletions lib/model/taxonomy.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
import { strict as assert } from 'assert'
import { isObject } from '../runtime'
import {
strict as assert,
/* */
} from 'assert'
import {
isObject,
/* */
} from '../runtime'

/**
* Structure content to help organization.
Expand Down
5 changes: 4 additions & 1 deletion lib/runtime/hypothesis.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import type { ScriptPropertyBase } from 'vue-meta'
import type {
ScriptPropertyBase,
/* */
} from 'vue-meta'

export const createVueMetaHeadScriptForHypothesis = (): ScriptPropertyBase => ({
// <script src="https://hypothes.is/embed.js" async></script>
Expand Down
14 changes: 12 additions & 2 deletions lib/runtime/nuxt-content-links.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
import type { INuxtContentResult, INuxtContentBodyType, VueNodeTag } from '..'
import { getVueNodeChildren, getVueNodeType, getVueNodeTag } from '../model'
import type {
INuxtContentResult,
INuxtContentBodyType,
VueNodeTag,
/* */
} from '..'
import {
getVueNodeChildren,
getVueNodeType,
getVueNodeTag,
/* */
} from '../model'

export const extractVueTreeLinks = (document: INuxtContentResult): string[] => {
// Cannot use Set() because that's only for one page here. And we'll have to merge them all.
Expand Down
Loading

0 comments on commit 347ce78

Please sign in to comment.