Skip to content

Commit fa022b2

Browse files
authored
build(server): upgrade eslint config and add compatibility workarounds (#25892)
1 parent a8c7b35 commit fa022b2

File tree

61 files changed

+336
-961
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+336
-961
lines changed

fluidBuild.config.cjs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,8 +344,14 @@ module.exports = {
344344
"^packages/test/test-utils/package.json",
345345
// TODO: AB#7630 uses lint only ts projects for coverage which don't have representative tsc scripts
346346
"^packages/tools/fluid-runner/package.json",
347+
348+
// Server packages need to be cleaned up; excluding as a workaround
349+
"^server/routerlicious/packages/.*/package.json",
350+
],
351+
"fluid-build-tasks-tsc": [
352+
// Server packages need to be cleaned up; excluding as a workaround
353+
"^server/routerlicious/packages/.*/package.json",
347354
],
348-
"fluid-build-tasks-tsc": [],
349355
"html-copyright-file-header": [
350356
// Tests generate HTML "snapshot" artifacts
351357
"tools/api-markdown-documenter/src/test/snapshots/.*",

server/routerlicious/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,10 +139,12 @@
139139
"pnpm": {
140140
"commentsOverrides": [
141141
"@types/node is overridden to v18 to ensure all packages are building using the v18 types.",
142+
"node types >= 22 are bumped down to 20.x to work around issues with packages using different types.",
142143
"oclif includes some AWS-related features, but we don't use them, so we override those dependencies with empty packages. This helps reduce lockfile churn since the deps release very frequently."
143144
],
144145
"overrides": {
145146
"@types/node@<18": "^18.19.39",
147+
"@types/node@>=22": "^20.0.0",
146148
"oclif>@aws-sdk/client-cloudfront": "npm:[email protected]",
147149
"oclif>@aws-sdk/client-s3": "npm:[email protected]",
148150
"qs": "^6.11.0",

server/routerlicious/packages/gitresources/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"@fluid-tools/build-cli": "^0.60.0",
3333
"@fluidframework/build-common": "^2.0.3",
3434
"@fluidframework/build-tools": "^0.60.0",
35-
"@fluidframework/eslint-config-fluid": "^6.1.0",
35+
"@fluidframework/eslint-config-fluid": "^8.1.0",
3636
"@fluidframework/gitresources-previous": "npm:@fluidframework/[email protected]",
3737
"@microsoft/api-extractor": "^7.45.1",
3838
"concurrently": "^8.2.1",

server/routerlicious/packages/kafka-orderer/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"@fluid-tools/build-cli": "^0.60.0",
3636
"@fluidframework/build-common": "^2.0.3",
3737
"@fluidframework/build-tools": "^0.60.0",
38-
"@fluidframework/eslint-config-fluid": "^6.1.0",
38+
"@fluidframework/eslint-config-fluid": "^8.1.0",
3939
"@fluidframework/server-kafka-orderer-previous": "npm:@fluidframework/[email protected]",
4040
"@types/node": "^18.19.39",
4141
"concurrently": "^8.2.1",

server/routerlicious/packages/lambdas-driver/.eslintrc.cjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ module.exports = {
1212
project: ["./tsconfig.json", "./src/test/tsconfig.json"],
1313
},
1414
rules: {
15-
"import/no-nodejs-modules": "off",
15+
"import-x/no-nodejs-modules": "off",
1616
"promise/catch-or-return": ["error", { allowFinally: true }],
1717

1818
// TODO: enable strict null checks in tsconfig and remove these overrides
1919
"@typescript-eslint/prefer-nullish-coalescing": "off",
2020
"@typescript-eslint/strict-boolean-expressions": "off",
2121

2222
// TODO: remove usages of deprecated APIs and remove this override
23-
"import/no-deprecated": "warn",
23+
"import-x/no-deprecated": "warn",
2424
},
2525
};

server/routerlicious/packages/lambdas-driver/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
"@fluid-tools/build-cli": "^0.60.0",
6868
"@fluidframework/build-common": "^2.0.3",
6969
"@fluidframework/build-tools": "^0.60.0",
70-
"@fluidframework/eslint-config-fluid": "^6.1.0",
70+
"@fluidframework/eslint-config-fluid": "^8.1.0",
7171
"@fluidframework/server-lambdas-driver-previous": "npm:@fluidframework/[email protected]",
7272
"@fluidframework/server-test-utils": "workspace:~",
7373
"@types/async": "^3.2.9",

server/routerlicious/packages/lambdas/.eslintrc.cjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ module.exports = {
77
extends: [require.resolve("@fluidframework/eslint-config-fluid"), "prettier"],
88
rules: {
99
"@rushstack/no-new-null": "off",
10-
"import/no-nodejs-modules": "off",
10+
"import-x/no-nodejs-modules": "off",
1111
"promise/catch-or-return": ["error", { allowFinally: true }],
1212
"unicorn/no-null": "off",
1313

@@ -27,7 +27,7 @@ module.exports = {
2727
"@typescript-eslint/prefer-nullish-coalescing": "off",
2828

2929
// TODO: remove usages of deprecated APIs and remove this override
30-
"import/no-deprecated": "warn",
30+
"import-x/no-deprecated": "warn",
3131

3232
// TODO: fix violations and remove this override
3333
"@fluid-internal/fluid/no-unchecked-record-access": "warn",

server/routerlicious/packages/lambdas/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
"@fluid-tools/build-cli": "^0.60.0",
8181
"@fluidframework/build-common": "^2.0.3",
8282
"@fluidframework/build-tools": "^0.60.0",
83-
"@fluidframework/eslint-config-fluid": "^6.1.0",
83+
"@fluidframework/eslint-config-fluid": "^8.1.0",
8484
"@fluidframework/server-lambdas-previous": "npm:@fluidframework/[email protected]",
8585
"@fluidframework/server-test-utils": "workspace:~",
8686
"@types/async": "^3.2.9",

server/routerlicious/packages/lambdas/src/nexus/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -569,9 +569,9 @@ export function configureWebSocketServices(
569569
/**
570570
* @param contentBatches - typed as `unknown` array as it comes from wire and has not been validated.
571571
* v1 signals are expected to be an array of strings (Json.stringified `ISignalEnvelope`s from
572-
* [Container.submitSignal](https://github.com/microsoft/FluidFramework/blob/ccb26baf65be1cbe3f708ec0fe6887759c25be6d/packages/loader/container-loader/src/container.ts#L2292-L2294)
572+
* {@link https://github.com/microsoft/FluidFramework/blob/ccb26baf65be1cbe3f708ec0fe6887759c25be6d/packages/loader/container-loader/src/container.ts#L2292-L2294|Container.submitSignal}
573573
* and sent via
574-
* [DocumentDeltaConnection.emitMessages](https://github.com/microsoft/FluidFramework/blob/ccb26baf65be1cbe3f708ec0fe6887759c25be6d/packages/drivers/driver-base/src/documentDeltaConnection.ts#L313C1-L321C4)),
574+
* {@link https://github.com/microsoft/FluidFramework/blob/ccb26baf65be1cbe3f708ec0fe6887759c25be6d/packages/drivers/driver-base/src/documentDeltaConnection.ts#L313C1-L321C4|DocumentDeltaConnection.emitMessages}
575575
* but actual content is passed-thru and not decoded.
576576
*
577577
* v2 signals are expected to be an array of `ISentSignalMessage` objects.

server/routerlicious/packages/lambdas/src/scribe/lambda.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,7 @@ export class ScribeLambda implements IPartitionLambda {
584584
typeof message.contents === "string" &&
585585
message.type !== MessageType.ClientLeave
586586
) {
587-
// eslint-disable-next-line import/namespace
587+
// eslint-disable-next-line import-x/namespace
588588
const clonedMessage = _.cloneDeep(message);
589589
clonedMessage.contents = JSON.parse(clonedMessage.contents as string);
590590
this.protocolHandler.processMessage(clonedMessage, false);

0 commit comments

Comments
 (0)