feat: replace require with import 7/n

This commit is contained in:
DIYgod
2024-03-07 01:17:21 +08:00
parent 3d33ab1f72
commit 44c9853541
263 changed files with 629 additions and 567 deletions

View File

@@ -1,12 +1,13 @@
import cache from '@/utils/cache';
const { Client, isNotionClientError, APIErrorCode } = require('@notionhq/client');
import { Client, isNotionClientError, APIErrorCode } from '@notionhq/client';
import logger from '@/utils/logger';
import { config } from '@/config';
import { parseDate } from '@/utils/parse-date';
import got from '@/utils/got';
const { NotionToMarkdown } = require('notion-to-md');
import { NotionToMarkdown } from 'notion-to-md';
import { load } from 'cheerio';
const md = require('markdown-it')({
import MarkdownIt from 'markdown-it';
const md = MarkdownIt({
html: true,
linkify: true,
});