mirror of
https://github.com/dergigi/boris.git
synced 2025-12-16 22:24:25 +01:00
fix: resolve linting and type errors
- Add ESLint override for Node.js environment in api/ and services files - Fix WebSocket redeclaration warning in articleMeta.ts - Fix import path for profile utility (../../lib/profile) - Install @types/ws for TypeScript support - Remove unused @ts-expect-error directive
This commit is contained in:
11
package-lock.json
generated
11
package-lock.json
generated
@@ -45,6 +45,7 @@
|
||||
"@tailwindcss/postcss": "^4.1.14",
|
||||
"@types/react": "^18.2.43",
|
||||
"@types/react-dom": "^18.2.17",
|
||||
"@types/ws": "^8.18.1",
|
||||
"@typescript-eslint/eslint-plugin": "^6.14.0",
|
||||
"@typescript-eslint/parser": "^6.14.0",
|
||||
"@vitejs/plugin-react": "^4.2.1",
|
||||
@@ -3603,6 +3604,16 @@
|
||||
"integrity": "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@types/ws": {
|
||||
"version": "8.18.1",
|
||||
"resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.18.1.tgz",
|
||||
"integrity": "sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@types/node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/eslint-plugin": {
|
||||
"version": "6.21.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.21.0.tgz",
|
||||
|
||||
16
package.json
16
package.json
@@ -52,6 +52,7 @@
|
||||
"@tailwindcss/postcss": "^4.1.14",
|
||||
"@types/react": "^18.2.43",
|
||||
"@types/react-dom": "^18.2.17",
|
||||
"@types/ws": "^8.18.1",
|
||||
"@typescript-eslint/eslint-plugin": "^6.14.0",
|
||||
"@typescript-eslint/parser": "^6.14.0",
|
||||
"@vitejs/plugin-react": "^4.2.1",
|
||||
@@ -103,6 +104,19 @@
|
||||
"@typescript-eslint/no-explicit-any": "warn",
|
||||
"prefer-const": "error",
|
||||
"no-var": "error"
|
||||
}
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
"files": [
|
||||
"api/**/*.ts",
|
||||
"src/services/ogStore.ts",
|
||||
"src/services/articleMeta.ts"
|
||||
],
|
||||
"env": {
|
||||
"node": true,
|
||||
"browser": false
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import WebSocket from 'ws'
|
||||
;(globalThis as any).WebSocket ??= WebSocket as any
|
||||
;(globalThis as unknown as { WebSocket?: typeof WebSocket }).WebSocket ??= WebSocket
|
||||
import { RelayPool } from 'applesauce-relay'
|
||||
import { nip19 } from 'nostr-tools'
|
||||
import { AddressPointer } from 'nostr-tools/nip19'
|
||||
import { NostrEvent, Filter } from 'nostr-tools'
|
||||
import { Helpers } from 'applesauce-core'
|
||||
import { extractProfileDisplayName } from '../lib/profile'
|
||||
import { extractProfileDisplayName } from '../../lib/profile'
|
||||
import { RELAYS } from '../config/relays'
|
||||
import type { ArticleMetadata } from './ogStore'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user