fix ts type error

This commit is contained in:
duanfuxiang 2025-01-06 13:51:41 +08:00
parent aa4bcf326d
commit c8bf0d263c
5 changed files with 18 additions and 10 deletions

View File

@ -60,7 +60,13 @@ const config = {
},
],
},
ignorePatterns: ['.eslintrc.js'],
ignorePatterns: [
'.eslintrc.js',
'node_modules/**',
'dist/**',
'build/**',
'main.js',
],
}
module.exports = config

View File

@ -43,6 +43,9 @@ const context = await esbuild.context({
inject: [path.resolve('import-meta-url-shim.js')],
target: 'es2020',
logLevel: 'info', // 'debug' for more detailed output
logOverride: {
'import-is-undefined': 'silent', // 忽略 import-is-undefined 警告
},
sourcemap: prod ? false : 'inline',
treeShaking: true,
outfile: 'main.js',

View File

@ -5,7 +5,6 @@
"minAppVersion": "0.15.0",
"description": "A Cursor-inspired AI assistant for Obsidian that offers smart autocomplete and interactive chat with your selected notes",
"author": "Felix.D",
"authorUrl": "https://github.com/glowingjade",
"fundingUrl": "https://buymeacoffee.com/glowingjade",
"isDesktopOnly": false
"authorUrl": "https://github.com/infiolab",
"isDesktopOnly": true
}

View File

@ -1,6 +1,6 @@
import { PGlite } from '@electric-sql/pglite'
import { type PGliteWithLive, live } from '@electric-sql/pglite/dist/live'
// import { PgliteDatabase, drizzle } from 'drizzle-orm/pglite'
// @ts-ignore
import { type PGliteWithLive, live } from '@electric-sql/pglite/live'
import { App, normalizePath } from 'obsidian'
import { PGLITE_DB_PATH } from '../constants'

View File

@ -65,10 +65,10 @@
/* Module Resolution Paths
* Custom path mappings for module resolution
*/
"paths": {
"@codemirror/*": ["node_modules/@codemirror/*"], // Map CodeMirror imports
"*": ["node_modules/*", "src/types/*"] // Fallback paths for module resolution
}
// "paths": {
// "@codemirror/*": ["node_modules/@codemirror/*"], // Map CodeMirror imports
// "*": ["node_modules/*", "src/types/*"] // Fallback paths for module resolution
// }
},
// Specify which files to include in compilation
"include": ["src/**/*.ts", "src/**/*.tsx", "__mocks__"]