chore: fix eslint in blocksuite (#9232)

This commit is contained in:
Saul-Mirone
2024-12-20 16:48:10 +00:00
parent bfcc53dc1f
commit 3a82da0e5b
269 changed files with 935 additions and 842 deletions

View File

@@ -78,9 +78,9 @@ function customizer(_target: unknown, source: unknown) {
export class EditPropsStore extends LifeCycleWatcher {
static override key = 'EditPropsStore';
private _disposables = new DisposableGroup();
private readonly _disposables = new DisposableGroup();
private innerProps$: Signal<DeepPartial<LastProps>> = signal({});
private readonly innerProps$: Signal<DeepPartial<LastProps>> = signal({});
lastProps$: Signal<LastProps>;

View File

@@ -23,7 +23,7 @@ export class EmbedOptionService
extends Extension
implements EmbedOptionProvider
{
private _embedBlockRegistry = new Set<EmbedOptions>();
private readonly _embedBlockRegistry = new Set<EmbedOptions>();
getEmbedBlockOptions = (url: string): EmbedOptions | null => {
const entries = this._embedBlockRegistry.entries();

View File

@@ -61,7 +61,7 @@ export class ThemeService extends Extension {
return isInsideEdgelessEditor(this.std.host) ? this.edgeless$ : this.app$;
}
constructor(private std: BlockStdScope) {
constructor(private readonly std: BlockStdScope) {
super();
const extension = this.std.getOptional(ThemeExtensionIdentifier);
this.app$ = extension?.getAppTheme?.() || getThemeObserver().theme$;
@@ -172,7 +172,7 @@ export class ThemeService extends Extension {
}
export class ThemeObserver {
private observer: MutationObserver;
private readonly observer: MutationObserver;
theme$ = signal(ColorScheme.Light);

View File

@@ -6,7 +6,7 @@ import { SpecBuilder } from './spec-builder.js';
export class SpecProvider {
static instance: SpecProvider;
private specMap = new Map<string, ExtensionType[]>();
private readonly specMap = new Map<string, ExtensionType[]>();
private constructor() {}