fix: add prefer-readonly rule (#5122)

This commit is contained in:
LongYinan
2023-11-29 04:44:25 +00:00
parent e9ea67bd38
commit 7a7cbc45d7
21 changed files with 39 additions and 36 deletions

View File

@@ -5,8 +5,8 @@ import type { Map as YMap } from 'yjs';
import { Doc as YDoc } from 'yjs';
export class UserSetting {
constructor(
private workspace: Workspace,
private userId: string
private readonly workspace: Workspace,
private readonly userId: string
) {}
get setting(): YDoc {

View File

@@ -13,7 +13,7 @@ const COLLECTIONS_TRASH_KEY = 'collections_trash';
const SETTING_KEY = 'setting';
export class WorkspaceSetting {
constructor(private workspace: Workspace) {}
constructor(private readonly workspace: Workspace) {}
get doc() {
return this.workspace.doc;