Skip to content

Commit

Permalink
chore: tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
meteorlxy committed Aug 20, 2024
1 parent 31009a0 commit 9e35b80
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion plugins/blog/plugin-feed/src/node/generator/rss/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const getRSSEnclosure = (enclosure: FeedEnclosure): RSSEnclosure => ({
*/
export const getRssFeed = (feedStore: FeedStore): string => {
const { channel, links } = feedStore
let hasContent = false
let hasContent = false as boolean

const content: RSSContent = {
_declaration: { _attributes: { version: '1.0', encoding: 'utf-8' } },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { Ref } from 'vue'
import { ref } from 'vue'
import type { ThemeData } from '../../shared/index.js'

declare const __VUE_HMR_RUNTIME__: Record<string, any>
declare const __VUE_HMR_RUNTIME__: Record<string, unknown>

export type ThemeDataRef<T extends ThemeData = ThemeData> = Ref<T>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const createNotationRule = (
const nodeRemove: OpenTag[] = []

parser.lines.forEach((node, index) => {
let replaced = false
let replaced = false as boolean

node.content = node.content.replace(pattern, (...match) => {
if (onMatch(match, index)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export const useDocsearchShim = (): Partial<DocSearchProps> => {
event.preventDefault()
router.push(hit.url.replace(__VUEPRESS_BASE__, '/'))
},
children,
children: children as unknown,
},
__v: null,
}) as unknown,
Expand Down
2 changes: 2 additions & 0 deletions tools/helper/src/node/page/excerpt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ const handleNode = (
if (node.tagName === 'code' || node.tagName === 'pre')
delete node.attribs['v-pre']

// eslint-disable-next-line @typescript-eslint/no-use-before-define
node.children = handleNodes(node.children, {
base,
isCustomElement,
Expand All @@ -156,6 +157,7 @@ const handleNode = (
node.attribs.target = '_blank'
delete node.attribs.to

// eslint-disable-next-line @typescript-eslint/no-use-before-define
node.children = handleNodes(node.children, {
base,
isCustomElement,
Expand Down
1 change: 1 addition & 0 deletions tools/helper/src/node/page/text.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ const handleNode = (
!removedTags.includes(node.tagName) &&
isHTMLTag(node.tagName)
) {
// eslint-disable-next-line @typescript-eslint/no-use-before-define
return handleNodes(node.children, { base, removedTags })
}

Expand Down
3 changes: 2 additions & 1 deletion tools/vp-update/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ cli
'pnpm dlx vp-update [dir] / npx vp-update [dir] / bunx vp-update [dir]',
)
.example('docs')
.action(async (targetDir = ''): Promise<Error | void> => {
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
.action(async (targetDir: string = ''): Promise<Error | void> => {
console.log('Bumping deps...')
const dir = resolve(process.cwd(), targetDir)
const packageJSON = resolve(dir, 'package.json')
Expand Down

0 comments on commit 9e35b80

Please sign in to comment.