mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Configure more comprehensive eslint rules for Typescript
Summary: - Update rules to be more like we've had with tslint - Switch tsserver plugin to eslint (tsserver makes for a much faster way to lint in editors) - Apply suggested auto-fixes - Fix all lint errors and warnings in core/, app/, test/ Test Plan: Some behavior may change subtly (e.g. added missing awaits), relying on existing tests to catch problems. Reviewers: paulfitz Reviewed By: paulfitz Differential Revision: https://phab.getgrist.com/D2785
This commit is contained in:
@@ -155,7 +155,7 @@ export class Sharing {
|
||||
private async _rebaseLocalActions(): Promise<void> {
|
||||
const rebaseQueue: Deque<UserActionBundle> = new Deque<UserActionBundle>();
|
||||
try {
|
||||
await this.createCheckpoint();
|
||||
this.createCheckpoint();
|
||||
const actions: LocalActionBundle[] = await this._actionHistory.fetchAllLocal();
|
||||
assert(actions.length > 0);
|
||||
await this.doApplyUserActionBundle(this._createUndo(actions), null);
|
||||
@@ -163,7 +163,7 @@ export class Sharing {
|
||||
await this._actionHistory.clearLocalActions();
|
||||
} catch (e) {
|
||||
log.error("Can't undo local actions; sharing is off");
|
||||
await this.rollbackToCheckpoint();
|
||||
this.rollbackToCheckpoint();
|
||||
// TODO this.disconnect();
|
||||
// TODO errorState = true;
|
||||
return;
|
||||
@@ -185,11 +185,11 @@ export class Sharing {
|
||||
}
|
||||
}
|
||||
if (rebaseFailures.length > 0) {
|
||||
await this.createBackupAtCheckpoint();
|
||||
this.createBackupAtCheckpoint();
|
||||
// TODO we should notify the user too.
|
||||
log.error('Rebase failed to reapply some of your actions, backup of local at...');
|
||||
}
|
||||
await this.releaseCheckpoint();
|
||||
this.releaseCheckpoint();
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
@@ -374,7 +374,9 @@ export class Sharing {
|
||||
const docActions = getEnvContent(sandboxActionBundle.stored).concat(
|
||||
getEnvContent(sandboxActionBundle.calc));
|
||||
|
||||
const accessControl = this._activeDoc.getGranularAccessForBundle(docSession || makeExceptionalDocSession('share'), docActions, undo, userActions);
|
||||
const accessControl = this._activeDoc.getGranularAccessForBundle(
|
||||
docSession || makeExceptionalDocSession('share'), docActions, undo, userActions
|
||||
);
|
||||
try {
|
||||
// TODO: see if any of the code paths that have no docSession are relevant outside
|
||||
// of tests.
|
||||
|
||||
Reference in New Issue
Block a user