fix: use ES6 import instead of require in helpers.ts

- Replace require() call with ES6 import for READING_PROGRESS constant
- Fixes linter error: 'require' is not defined (no-undef)
- All linter checks now pass with no warnings or errors
This commit is contained in:
Gigi
2025-10-19 22:19:06 +02:00
parent 83e4a2ad4c
commit db3084b373

View File

@@ -1,4 +1,6 @@
// Extract pubkeys from nprofile strings in content
import { READING_PROGRESS } from '../config/kinds'
export const extractNprofilePubkeys = (content: string): string[] => {
const nprofileRegex = /nprofile1[a-z0-9]+/gi
const matches = content.match(nprofileRegex) || []
@@ -128,7 +130,6 @@ export function createParallelReqStreams(
* Minimum 1000 characters (roughly 150 words)
*/
export const shouldTrackReadingProgress = (html: string | undefined, markdown: string | undefined): boolean => {
const { READING_PROGRESS } = require('../config/kinds')
const content = (html || markdown || '').trim()
// Strip HTML tags to get character count
const plainText = content.replace(/<[^>]*>/g, '').trim()