From 3ad806d13f49c8314250ae8a2bc852a50d00f526 Mon Sep 17 00:00:00 2001 From: Pcrab Date: Sat, 1 Apr 2023 17:39:21 +0800 Subject: [PATCH] style: use import type for type only imports --- lib/extend/processor.ts | 2 +- lib/extend/syntax_highlight.ts | 2 +- lib/plugins/console/index.ts | 2 +- lib/plugins/filter/index.ts | 2 +- lib/plugins/generator/asset.ts | 2 +- lib/plugins/generator/index.ts | 2 +- lib/plugins/helper/index.ts | 2 +- lib/plugins/highlight/index.ts | 2 +- lib/plugins/injector/index.ts | 2 +- lib/plugins/processor/index.ts | 2 +- lib/plugins/renderer/index.ts | 2 +- lib/plugins/tag/index.ts | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/lib/extend/processor.ts b/lib/extend/processor.ts index 8d2bb73481..0af6998494 100644 --- a/lib/extend/processor.ts +++ b/lib/extend/processor.ts @@ -1,6 +1,6 @@ import Promise from 'bluebird'; import { Pattern } from 'hexo-util'; -import File from '../box/file'; +import type File from '../box/file'; interface StoreFunction { (file: File): any diff --git a/lib/extend/syntax_highlight.ts b/lib/extend/syntax_highlight.ts index a9a519396c..edddc2c9ef 100644 --- a/lib/extend/syntax_highlight.ts +++ b/lib/extend/syntax_highlight.ts @@ -1,4 +1,4 @@ -import Hexo from '../hexo'; +import type Hexo from '../hexo'; export interface HighlightOptions { // plulgins/filter/before_post_render/backtick_code_block diff --git a/lib/plugins/console/index.ts b/lib/plugins/console/index.ts index 3d95e17001..dc4b6e5f40 100644 --- a/lib/plugins/console/index.ts +++ b/lib/plugins/console/index.ts @@ -1,4 +1,4 @@ -import Hexo from '../../hexo'; +import type Hexo from '../../hexo'; export = function(ctx: Hexo) { const { console } = ctx.extend; diff --git a/lib/plugins/filter/index.ts b/lib/plugins/filter/index.ts index 84c15c7c64..26aed0bf0d 100644 --- a/lib/plugins/filter/index.ts +++ b/lib/plugins/filter/index.ts @@ -1,4 +1,4 @@ -import Hexo from '../../hexo'; +import type Hexo from '../../hexo'; export = (ctx: Hexo) => { const { filter } = ctx.extend; diff --git a/lib/plugins/generator/asset.ts b/lib/plugins/generator/asset.ts index b7dcb47a83..722807c52e 100644 --- a/lib/plugins/generator/asset.ts +++ b/lib/plugins/generator/asset.ts @@ -3,7 +3,7 @@ import { exists, createReadStream } from 'hexo-fs'; import Promise from 'bluebird'; import { extname } from 'path'; import { magenta } from 'picocolors'; -import warehouse from 'warehouse'; +import type warehouse from 'warehouse'; interface Data { modified: boolean; diff --git a/lib/plugins/generator/index.ts b/lib/plugins/generator/index.ts index 21461fd93d..9c65363065 100644 --- a/lib/plugins/generator/index.ts +++ b/lib/plugins/generator/index.ts @@ -1,4 +1,4 @@ -import Hexo from '../../hexo'; +import type Hexo from '../../hexo'; export = (ctx: Hexo) => { const { generator } = ctx.extend; diff --git a/lib/plugins/helper/index.ts b/lib/plugins/helper/index.ts index e37c295831..8a90bc1132 100644 --- a/lib/plugins/helper/index.ts +++ b/lib/plugins/helper/index.ts @@ -1,4 +1,4 @@ -import Hexo from '../../hexo'; +import type Hexo from '../../hexo'; export = (ctx: Hexo) => { const { helper } = ctx.extend; diff --git a/lib/plugins/highlight/index.ts b/lib/plugins/highlight/index.ts index c18bc9d4a0..14da505e7f 100644 --- a/lib/plugins/highlight/index.ts +++ b/lib/plugins/highlight/index.ts @@ -1,4 +1,4 @@ -import Hexo from '../../hexo'; +import type Hexo from '../../hexo'; module.exports = (ctx: Hexo) => { const { highlight } = ctx.extend; diff --git a/lib/plugins/injector/index.ts b/lib/plugins/injector/index.ts index 606378f214..6736417bc8 100644 --- a/lib/plugins/injector/index.ts +++ b/lib/plugins/injector/index.ts @@ -1,4 +1,4 @@ -import Hexo from '../../hexo'; +import type Hexo from '../../hexo'; export = (ctx: Hexo) => { // eslint-disable-next-line no-unused-vars diff --git a/lib/plugins/processor/index.ts b/lib/plugins/processor/index.ts index df0bc0b604..e7ae2c580c 100644 --- a/lib/plugins/processor/index.ts +++ b/lib/plugins/processor/index.ts @@ -1,4 +1,4 @@ -import Hexo from '../../hexo'; +import type Hexo from '../../hexo'; export = (ctx: Hexo) => { const { processor } = ctx.extend; diff --git a/lib/plugins/renderer/index.ts b/lib/plugins/renderer/index.ts index 5403178e3d..c8529c5a57 100644 --- a/lib/plugins/renderer/index.ts +++ b/lib/plugins/renderer/index.ts @@ -1,4 +1,4 @@ -import Hexo from '../../hexo'; +import type Hexo from '../../hexo'; export = (ctx: Hexo) => { const { renderer } = ctx.extend; diff --git a/lib/plugins/tag/index.ts b/lib/plugins/tag/index.ts index c13b60a2da..af7b513211 100644 --- a/lib/plugins/tag/index.ts +++ b/lib/plugins/tag/index.ts @@ -1,5 +1,5 @@ import moize from 'moize'; -import Hexo from '../../hexo'; +import type Hexo from '../../hexo'; export default (ctx: Hexo) => { const { tag } = ctx.extend;