Skip to content

Commit

Permalink
Integrate latest prerelease of eslint-config-fluid throughout the rep…
Browse files Browse the repository at this point in the history
…o and fix up errors (#9389)
  • Loading branch information
ChumpChief authored Mar 8, 2022
1 parent 67cdd6f commit 71cab8a
Show file tree
Hide file tree
Showing 366 changed files with 5,601 additions and 5,821 deletions.
5 changes: 1 addition & 4 deletions api-report/sequence.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import { BaseSegment } from '@fluidframework/merge-tree';
import { Client } from '@fluidframework/merge-tree';
import { Deferred } from '@fluidframework/common-utils';
import { FluidObject } from '@fluidframework/core-interfaces';
import { IChannelAttributes } from '@fluidframework/datastore-definitions';
import { IChannelFactory } from '@fluidframework/datastore-definitions';
import { IChannelServices } from '@fluidframework/datastore-definitions';
Expand All @@ -17,8 +16,6 @@ import { IEvent } from '@fluidframework/common-definitions';
import { IEventThisPlaceHolder } from '@fluidframework/common-definitions';
import { IFluidDataStoreRuntime } from '@fluidframework/datastore-definitions';
import { IFluidHandle } from '@fluidframework/core-interfaces';
import { IFluidLoadable } from '@fluidframework/core-interfaces';
import { IFluidObject } from '@fluidframework/core-interfaces';
import { IFluidSerializer } from '@fluidframework/shared-object-base';
import { IInterval } from '@fluidframework/merge-tree';
import { IJSONSegment } from '@fluidframework/merge-tree';
Expand Down Expand Up @@ -673,7 +670,7 @@ export class SparseMatrix extends SharedSegmentSequence<MatrixSegment> {
static create(runtime: IFluidDataStoreRuntime, id?: string): SparseMatrix;
static getFactory(): IChannelFactory;
// (undocumented)
getItem(row: number, col: number): Jsonable<string | number | boolean | IFluidHandle<IFluidObject & FluidObject & IFluidLoadable>>;
getItem(row: number, col: number): Jsonable<string | number | boolean | IFluidHandle>;
// (undocumented)
getPositionProperties(row: number, col: number): PropertySet;
// (undocumented)
Expand Down
6 changes: 3 additions & 3 deletions common/lib/common-definitions/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion common/lib/common-definitions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"@fluidframework/build-common": "^0.23.0",
"@fluidframework/build-tools": "^0.2.54658",
"@fluidframework/common-definitions-0.20.0": "npm:@fluidframework/common-definitions@0.20.0",
"@fluidframework/eslint-config-fluid": "^0.26.0",
"@fluidframework/eslint-config-fluid": "^0.27.0-0",
"@microsoft/api-extractor": "^7.16.1",
"@rushstack/eslint-config": "^2.5.1",
"@typescript-eslint/eslint-plugin": "~5.9.0",
Expand Down
6 changes: 3 additions & 3 deletions common/lib/common-utils/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion common/lib/common-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
"@fluidframework/build-common": "^0.23.0",
"@fluidframework/build-tools": "^0.2.54658",
"@fluidframework/common-utils-0.32.1": "npm:@fluidframework/common-utils@0.32.1",
"@fluidframework/eslint-config-fluid": "^0.26.0",
"@fluidframework/eslint-config-fluid": "^0.27.0-0",
"@microsoft/api-extractor": "^7.16.1",
"@rushstack/eslint-config": "^2.5.1",
"@types/base64-js": "^1.3.0",
Expand Down
6 changes: 3 additions & 3 deletions common/lib/container-definitions/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion common/lib/container-definitions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"@fluidframework/container-definitions-0.44.0": "npm:@fluidframework/container-definitions@0.44.0",
"@fluidframework/container-definitions-0.45.0": "npm:@fluidframework/container-definitions@0.45.0",
"@fluidframework/container-definitions-0.46.0": "npm:@fluidframework/container-definitions@0.46.0",
"@fluidframework/eslint-config-fluid": "^0.26.0",
"@fluidframework/eslint-config-fluid": "^0.27.0-0",
"@microsoft/api-extractor": "^7.16.1",
"@rushstack/eslint-config": "^2.5.1",
"@types/mocha": "^8.2.2",
Expand Down
6 changes: 3 additions & 3 deletions common/lib/core-interfaces/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion common/lib/core-interfaces/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"@fluidframework/core-interfaces-0.40.0": "npm:@fluidframework/core-interfaces@0.40.0",
"@fluidframework/core-interfaces-0.41.0": "npm:@fluidframework/core-interfaces@0.41.0",
"@fluidframework/core-interfaces-0.42.0": "npm:@fluidframework/core-interfaces@0.42.0",
"@fluidframework/eslint-config-fluid": "^0.26.0",
"@fluidframework/eslint-config-fluid": "^0.27.0-0",
"@microsoft/api-extractor": "^7.16.1",
"@rushstack/eslint-config": "^2.5.1",
"@types/node": "^14.18.0",
Expand Down
6 changes: 3 additions & 3 deletions common/lib/driver-definitions/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion common/lib/driver-definitions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"@fluidframework/driver-definitions-0.42.0": "npm:@fluidframework/driver-definitions@0.42.0",
"@fluidframework/driver-definitions-0.43.0": "npm:@fluidframework/driver-definitions@0.43.0",
"@fluidframework/driver-definitions-0.44.0": "npm:@fluidframework/driver-definitions@0.44.0",
"@fluidframework/eslint-config-fluid": "^0.26.0",
"@fluidframework/eslint-config-fluid": "^0.27.0-0",
"@microsoft/api-extractor": "^7.16.1",
"@rushstack/eslint-config": "^2.5.1",
"@typescript-eslint/eslint-plugin": "~5.9.0",
Expand Down
6 changes: 3 additions & 3 deletions common/lib/protocol-definitions/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion common/lib/protocol-definitions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"devDependencies": {
"@fluidframework/build-common": "^0.23.0",
"@fluidframework/build-tools": "^0.2.54658",
"@fluidframework/eslint-config-fluid": "^0.26.0",
"@fluidframework/eslint-config-fluid": "^0.27.0-0",
"@fluidframework/protocol-definitions-0.1024.0": "npm:@fluidframework/protocol-definitions@0.1024.0",
"@fluidframework/protocol-definitions-0.1025.1": "npm:@fluidframework/protocol-definitions@0.1025.1",
"@fluidframework/protocol-definitions-0.1026.0": "npm:@fluidframework/protocol-definitions@0.1026.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/apps/collaborative-textarea/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"devDependencies": {
"@fluid-tools/webpack-fluid-loader": "^0.58.1000",
"@fluidframework/build-common": "^0.23.0",
"@fluidframework/eslint-config-fluid": "^0.26.0",
"@fluidframework/eslint-config-fluid": "^0.27.0-0",
"@fluidframework/test-tools": "^0.2.3074",
"@fluidframework/test-utils": "^0.58.1000",
"@rushstack/eslint-config": "^2.5.1",
Expand Down
2 changes: 1 addition & 1 deletion examples/apps/contact-collection/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
},
"devDependencies": {
"@fluidframework/build-common": "^0.23.0",
"@fluidframework/eslint-config-fluid": "^0.26.0",
"@fluidframework/eslint-config-fluid": "^0.27.0-0",
"@fluidframework/test-tools": "^0.2.3074",
"@rushstack/eslint-config": "^2.5.1",
"@types/expect-puppeteer": "2.2.1",
Expand Down
2 changes: 1 addition & 1 deletion examples/apps/spaces/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
},
"devDependencies": {
"@fluidframework/build-common": "^0.23.0",
"@fluidframework/eslint-config-fluid": "^0.26.0",
"@fluidframework/eslint-config-fluid": "^0.27.0-0",
"@fluidframework/test-tools": "^0.2.3074",
"@rushstack/eslint-config": "^2.5.1",
"@types/expect-puppeteer": "2.2.1",
Expand Down
2 changes: 1 addition & 1 deletion examples/apps/view-framework-sampler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
},
"devDependencies": {
"@fluidframework/build-common": "^0.23.0",
"@fluidframework/eslint-config-fluid": "^0.26.0",
"@fluidframework/eslint-config-fluid": "^0.27.0-0",
"@fluidframework/test-tools": "^0.2.3074",
"@rushstack/eslint-config": "^2.5.1",
"@types/expect-puppeteer": "2.2.1",
Expand Down
2 changes: 1 addition & 1 deletion examples/data-objects/badge/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"devDependencies": {
"@fluid-tools/webpack-fluid-loader": "^0.58.1000",
"@fluidframework/build-common": "^0.23.0",
"@fluidframework/eslint-config-fluid": "^0.26.0",
"@fluidframework/eslint-config-fluid": "^0.27.0-0",
"@rushstack/eslint-config": "^2.5.1",
"@types/node": "^14.18.0",
"@types/react": "^16.9.15",
Expand Down
2 changes: 1 addition & 1 deletion examples/data-objects/canvas/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"devDependencies": {
"@fluid-tools/webpack-fluid-loader": "^0.58.1000",
"@fluidframework/build-common": "^0.23.0",
"@fluidframework/eslint-config-fluid": "^0.26.0",
"@fluidframework/eslint-config-fluid": "^0.27.0-0",
"@fluidframework/test-tools": "^0.2.3074",
"@rushstack/eslint-config": "^2.5.1",
"@types/expect-puppeteer": "2.2.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"devDependencies": {
"@fluid-tools/webpack-fluid-loader": "^0.58.1000",
"@fluidframework/build-common": "^0.23.0",
"@fluidframework/eslint-config-fluid": "^0.26.0",
"@fluidframework/eslint-config-fluid": "^0.27.0-0",
"@fluidframework/test-tools": "^0.2.3074",
"@rushstack/eslint-config": "^2.5.1",
"@types/expect-puppeteer": "2.2.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"devDependencies": {
"@fluid-tools/webpack-fluid-loader": "^0.58.1000",
"@fluidframework/build-common": "^0.23.0",
"@fluidframework/eslint-config-fluid": "^0.26.0",
"@fluidframework/eslint-config-fluid": "^0.27.0-0",
"@fluidframework/test-tools": "^0.2.3074",
"@rushstack/eslint-config": "^2.5.1",
"@types/expect-puppeteer": "2.2.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"devDependencies": {
"@fluid-tools/webpack-fluid-loader": "^0.58.1000",
"@fluidframework/build-common": "^0.23.0",
"@fluidframework/eslint-config-fluid": "^0.26.0",
"@fluidframework/eslint-config-fluid": "^0.27.0-0",
"@fluidframework/test-tools": "^0.2.3074",
"@fluidframework/test-utils": "^0.58.1000",
"@rushstack/eslint-config": "^2.5.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"devDependencies": {
"@fluid-tools/webpack-fluid-loader": "^0.58.1000",
"@fluidframework/build-common": "^0.23.0",
"@fluidframework/eslint-config-fluid": "^0.26.0",
"@fluidframework/eslint-config-fluid": "^0.27.0-0",
"@fluidframework/test-tools": "^0.2.3074",
"@fluidframework/test-utils": "^0.58.1000",
"@rushstack/eslint-config": "^2.5.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"devDependencies": {
"@fluid-tools/webpack-fluid-loader": "^0.58.1000",
"@fluidframework/build-common": "^0.23.0",
"@fluidframework/eslint-config-fluid": "^0.26.0",
"@fluidframework/eslint-config-fluid": "^0.27.0-0",
"@fluidframework/test-tools": "^0.2.3074",
"@fluidframework/test-utils": "^0.58.1000",
"@rushstack/eslint-config": "^2.5.1",
Expand Down
2 changes: 1 addition & 1 deletion examples/data-objects/clicker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"devDependencies": {
"@fluid-tools/webpack-fluid-loader": "^0.58.1000",
"@fluidframework/build-common": "^0.23.0",
"@fluidframework/eslint-config-fluid": "^0.26.0",
"@fluidframework/eslint-config-fluid": "^0.27.0-0",
"@fluidframework/test-tools": "^0.2.3074",
"@fluidframework/test-utils": "^0.58.1000",
"@rushstack/eslint-config": "^2.5.1",
Expand Down
2 changes: 1 addition & 1 deletion examples/data-objects/client-ui-lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
},
"devDependencies": {
"@fluidframework/build-common": "^0.23.0",
"@fluidframework/eslint-config-fluid": "^0.26.0",
"@fluidframework/eslint-config-fluid": "^0.27.0-0",
"@fluidframework/mocha-test-setup": "^0.58.1000",
"@rushstack/eslint-config": "^2.5.1",
"@types/debug": "^4.1.5",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export const CommandBox: React.FC<ICommandBoxProps> = (props: ICommandBoxProps)
inputEl.focus();
return () => {
inputEl.removeEventListener("input", filterCommands);
}
};
}
});

Expand Down
4 changes: 2 additions & 2 deletions examples/data-objects/client-ui-lib/src/controls/flowView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -799,13 +799,13 @@ function lineIntersectsRect(y: number, rect: IExcludedRectangle) {

class Viewport {
// Keep the line divs in order
private lineDivs: ILineDiv[] = [];
private readonly lineDivs: ILineDiv[] = [];
private lineTop = 0;
private excludedRects = <IExcludedRectangle[]>[];
private lineX = 0;
private readonly inclusions: Map<string, HTMLVideoElement> = new Map<string, HTMLVideoElement>();

constructor(private maxHeight: number, public div: IViewportDiv, private width: number) {
constructor(private readonly maxHeight: number, public div: IViewportDiv, private readonly width: number) {
}

// Remove inclusions that are not in the excluded rect list
Expand Down
2 changes: 1 addition & 1 deletion examples/data-objects/codemirror/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"devDependencies": {
"@fluid-tools/webpack-fluid-loader": "^0.58.1000",
"@fluidframework/build-common": "^0.23.0",
"@fluidframework/eslint-config-fluid": "^0.26.0",
"@fluidframework/eslint-config-fluid": "^0.27.0-0",
"@rushstack/eslint-config": "^2.5.1",
"@types/node": "^14.18.0",
"@typescript-eslint/eslint-plugin": "~5.9.0",
Expand Down
39 changes: 18 additions & 21 deletions examples/data-objects/codemirror/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { IContainerContext } from "@fluidframework/container-definitions";
import { ContainerRuntime } from "@fluidframework/container-runtime";
import { IContainerRuntime } from "@fluidframework/container-runtime-definitions";
import { IFluidDataStoreFactory } from "@fluidframework/runtime-definitions";
import { buildRuntimeRequestHandler, RuntimeRequestHandler } from "@fluidframework/request-handler";
import { buildRuntimeRequestHandler } from "@fluidframework/request-handler";
import { mountableViewRequestHandler } from "@fluidframework/aqueduct";
import {
requestFluidObject,
Expand Down Expand Up @@ -35,25 +35,22 @@ const defaultComponentId = "default";

const smde = new SmdeFactory();

type ViewCallback<T> = (fluidModel: T) => any;

const makeViewRequestHandler = <T>(viewCallback: ViewCallback<T>): RuntimeRequestHandler =>
async (request: RequestParser, runtime: IContainerRuntime) => {
if (request.pathParts.length === 0) {
const objectRequest = RequestParser.create({
url: ``,
headers: request.headers,
});
const fluidObject = await requestFluidObject<T>(
await runtime.getRootDataStore(defaultComponentId),
objectRequest);
const viewResponse = viewCallback(fluidObject);
return { status: 200, mimeType: "fluid/view", value: viewResponse };
}
};

const viewCallback =
(codeMirror: CodeMirrorComponent) => new CodeMirrorView(codeMirror.text, codeMirror.presenceManager);
const viewRequestHandler = async (request: RequestParser, runtime: IContainerRuntime) => {
if (request.pathParts.length === 0) {
const objectRequest = RequestParser.create({
url: ``,
headers: request.headers,
});
const codeMirror = await requestFluidObject<CodeMirrorComponent>(
await runtime.getRootDataStore(defaultComponentId),
objectRequest);
return {
status: 200,
mimeType: "fluid/view",
value: new CodeMirrorView(codeMirror.text, codeMirror.presenceManager),
};
}
};

class CodeMirrorFactory extends RuntimeFactoryHelper {
public async instantiateFirstTime(runtime: ContainerRuntime): Promise<void> {
Expand All @@ -72,7 +69,7 @@ class CodeMirrorFactory extends RuntimeFactoryHelper {
context,
registry,
buildRuntimeRequestHandler(
mountableViewRequestHandler(MountableView, [makeViewRequestHandler(viewCallback)]),
mountableViewRequestHandler(MountableView, [viewRequestHandler]),
),
undefined, // runtimeOptions
undefined, // containerScope
Expand Down
2 changes: 1 addition & 1 deletion examples/data-objects/diceroller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"devDependencies": {
"@fluid-tools/webpack-fluid-loader": "^0.58.1000",
"@fluidframework/build-common": "^0.23.0",
"@fluidframework/eslint-config-fluid": "^0.26.0",
"@fluidframework/eslint-config-fluid": "^0.27.0-0",
"@fluidframework/test-tools": "^0.2.3074",
"@rushstack/eslint-config": "^2.5.1",
"@types/expect-puppeteer": "2.2.1",
Expand Down
2 changes: 1 addition & 1 deletion examples/data-objects/focus-tracker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
},
"devDependencies": {
"@fluidframework/build-common": "^0.23.0",
"@fluidframework/eslint-config-fluid": "^0.26.0",
"@fluidframework/eslint-config-fluid": "^0.27.0-0",
"@fluidframework/test-tools": "^0.2.3074",
"@rushstack/eslint-config": "^2.5.1",
"@types/expect-puppeteer": "2.2.1",
Expand Down
2 changes: 1 addition & 1 deletion examples/data-objects/image-gallery/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
},
"devDependencies": {
"@fluid-tools/webpack-fluid-loader": "^0.58.1000",
"@fluidframework/eslint-config-fluid": "^0.26.0",
"@fluidframework/eslint-config-fluid": "^0.27.0-0",
"@rushstack/eslint-config": "^2.5.1",
"@types/node": "^14.18.0",
"@types/react": "^16.9.15",
Expand Down
Loading

0 comments on commit 71cab8a

Please sign in to comment.