File tree Expand file tree Collapse file tree 5 files changed +9
-8
lines changed
Expand file tree Collapse file tree 5 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -6,5 +6,5 @@ const configs: Linter.Config[] = [
66 ...obsidianDevUtilsConfigs
77] ;
88
9- // eslint-disable-next-line import-x/no-default-export
9+ // eslint-disable-next-line import-x/no-default-export -- ESLint infrastructure requires a default export.
1010export default configs ;
Original file line number Diff line number Diff line change 4040 "overrides" : {
4141 "@antfu/utils" : " 9.2.0" ,
4242 "boolean" : " npm:dry-uninstall" ,
43- "dompurify" : " 3.0.1"
43+ "dompurify" : " 3.0.1" ,
44+ "type-fest" : " 5.0.1"
4445 },
4546 "type" : " module"
4647}
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ type GetCacheFn = MetadataCache['getCache'];
3737export function initCanvasHandlers ( plugin : Plugin ) : void {
3838 const app = plugin . app ;
3939 registerPatch ( plugin , app . metadataCache , {
40- getCache : ( next : GetCacheFn ) => ( path ) : CachedMetadata | null => getCache ( app , path , next )
40+ getCache : ( next : GetCacheFn ) => ( path : string ) : CachedMetadata | null => getCache ( app , path , next )
4141 } ) ;
4242
4343 plugin . registerEvent ( app . vault . on ( 'create' , ( file ) => {
@@ -171,9 +171,9 @@ function arrayBufferToHexString(buffer: ArrayBuffer): string {
171171 const hexArray = [ ] ;
172172
173173 for ( const byte of uint8Array ) {
174- // eslint-disable-next-line no-bitwise, no-magic-numbers
174+ // eslint-disable-next-line no-bitwise, no-magic-numbers -- Magic numbers are OK in this case.
175175 hexArray . push ( ( byte >>> 4 ) . toString ( 16 ) ) ;
176- // eslint-disable-next-line no-bitwise, no-magic-numbers
176+ // eslint-disable-next-line no-bitwise, no-magic-numbers -- Magic numbers are OK in this case.
177177 hexArray . push ( ( byte & 0x0F ) . toString ( 16 ) ) ;
178178 }
179179
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ type GetBacklinksForFileFn = MetadataCache['getBacklinksForFile'];
5858
5959export class Plugin extends PluginBase < PluginTypes > {
6060 private readonly backlinksMap = new Map < string , Map < string , Set < Reference > > > ( ) ;
61- private debouncedProcessPendingActions ! : Debouncer < [ ] , Promise < void > > ;
61+ private debouncedProcessPendingActions ? : Debouncer < [ ] , Promise < void > > ;
6262
6363 private readonly linksMap = new Map < string , Set < string > > ( ) ;
6464
@@ -287,6 +287,6 @@ export class Plugin extends PluginBase<PluginTypes> {
287287
288288 private setPendingAction ( path : string , action : Action ) : void {
289289 this . pendingActions . set ( path , action ) ;
290- this . debouncedProcessPendingActions ( ) ;
290+ this . debouncedProcessPendingActions ?. ( ) ;
291291 }
292292}
Original file line number Diff line number Diff line change 11import { Plugin } from './Plugin.ts' ;
22
3- // eslint-disable-next-line import-x/no-default-export
3+ // eslint-disable-next-line import-x/no-default-export -- Obsidian infrastructure requires a default export.
44export default Plugin ;
You can’t perform that action at this time.
0 commit comments