From 018a8ddc88c4150cdacfcaac3d98b40754e1d0d0 Mon Sep 17 00:00:00 2001
From: Pedro Ferreira <10789765+apedroferreira@users.noreply.github.com>
Date: Thu, 5 Oct 2023 20:09:55 +0100
Subject: [PATCH 1/5] Update monorepo
---
yarn.lock | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/yarn.lock b/yarn.lock
index 06b50ee4de2..bbfd52a9a31 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1939,8 +1939,8 @@
react-transition-group "^4.4.5"
"@mui/monorepo@https://github.com/mui/material-ui.git":
- version "5.14.10"
- resolved "https://github.com/mui/material-ui.git#f1401844507519e09814bf8ea3ac338ec8011044"
+ version "5.14.11"
+ resolved "https://github.com/mui/material-ui.git#92a5d8550c41998ed06df884e45b230bdb239c18"
"@mui/private-theming@^5.14.12":
version "5.14.12"
From c5c979b779829330c104903d951a2a589401b2b4 Mon Sep 17 00:00:00 2001
From: Pedro Ferreira <10789765+apedroferreira@users.noreply.github.com>
Date: Thu, 5 Oct 2023 20:25:20 +0100
Subject: [PATCH 2/5] Fix eslint errors
---
docs/src/modules/components/SchemaReference.tsx | 4 ----
packages/toolpad-app/src/runtime/ToolpadApp.tsx | 1 -
packages/toolpad-app/src/server/localMode.ts | 1 -
test/integration/backend-basic/base.spec.ts | 2 +-
test/integration/backend-basic/baseProd.spec.ts | 2 +-
5 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/docs/src/modules/components/SchemaReference.tsx b/docs/src/modules/components/SchemaReference.tsx
index 1098be6b7ab..bdd01fff647 100644
--- a/docs/src/modules/components/SchemaReference.tsx
+++ b/docs/src/modules/components/SchemaReference.tsx
@@ -234,9 +234,7 @@ function JsonSchemaItemDisplay({ schema, idPrefix }: JsonSchemaItemDisplayProps)
return (
- {/* eslint-disable-next-line @typescript-eslint/no-use-before-define */}
- {/* eslint-disable-next-line @typescript-eslint/no-use-before-define */}
);
@@ -288,7 +286,6 @@ function JsonSchemaPropertiesDisplay({ schema, idPrefix, open }: JsonSchemaPrope
{interleave(
properties.map(([propName, propSchema]) => {
return (
- // eslint-disable-next-line @typescript-eslint/no-use-before-define
- {/* eslint-disable-next-line @typescript-eslint/no-use-before-define */}
diff --git a/packages/toolpad-app/src/runtime/ToolpadApp.tsx b/packages/toolpad-app/src/runtime/ToolpadApp.tsx
index 20df11f99f6..1918e819d08 100644
--- a/packages/toolpad-app/src/runtime/ToolpadApp.tsx
+++ b/packages/toolpad-app/src/runtime/ToolpadApp.tsx
@@ -644,7 +644,6 @@ function RenderedNode({ nodeId }: RenderedNodeProps) {
const childNodeGroups = appDom.getChildNodes(dom, node);
return (
- /* eslint-disable-next-line @typescript-eslint/no-use-before-define */
);
}
diff --git a/packages/toolpad-app/src/server/localMode.ts b/packages/toolpad-app/src/server/localMode.ts
index b161f25fc4c..49b669fd112 100644
--- a/packages/toolpad-app/src/server/localMode.ts
+++ b/packages/toolpad-app/src/server/localMode.ts
@@ -361,7 +361,6 @@ function expandChildren(children: N[], dom: appDom.
);
return appDom.compareFractionalIndex(child1.parentIndex, child2.parentIndex);
})
- // eslint-disable-next-line @typescript-eslint/no-use-before-define
.map((child) => expandFromDom(child, dom))
);
}
diff --git a/test/integration/backend-basic/base.spec.ts b/test/integration/backend-basic/base.spec.ts
index e8bec249c34..b6fb4f9918d 100644
--- a/test/integration/backend-basic/base.spec.ts
+++ b/test/integration/backend-basic/base.spec.ts
@@ -5,7 +5,7 @@ import { expectBasicPageContent } from './shared';
test.use({
ignoreConsoleErrors: [
- /The page’s settings blocked the loading of a resource at http:\/\/localhost:\d+\/favicon\.ico/,
+ /The page's settings blocked the loading of a resource at http:\/\/localhost:\d+\/favicon\.ico/,
/Failed to load resource: the server responded with a status of 404/,
],
});
diff --git a/test/integration/backend-basic/baseProd.spec.ts b/test/integration/backend-basic/baseProd.spec.ts
index 3b5a70e24e6..edca4b666dc 100644
--- a/test/integration/backend-basic/baseProd.spec.ts
+++ b/test/integration/backend-basic/baseProd.spec.ts
@@ -5,7 +5,7 @@ import { expectBasicPageContent } from './shared';
test.use({
ignoreConsoleErrors: [
- /The page’s settings blocked the loading of a resource at http:\/\/localhost:\d+\/favicon\.ico/,
+ /The page's settings blocked the loading of a resource at http:\/\/localhost:\d+\/favicon\.ico/,
/Failed to load resource: the server responded with a status of 404/,
],
});
From c865058ad5d33fec95c15f140579de8f76aa69fd Mon Sep 17 00:00:00 2001
From: Pedro Ferreira <10789765+apedroferreira@users.noreply.github.com>
Date: Thu, 5 Oct 2023 20:48:52 +0100
Subject: [PATCH 3/5] Run Prettier
---
packages/toolpad-app/src/server/localMode.ts | 17 ++++++-----------
1 file changed, 6 insertions(+), 11 deletions(-)
diff --git a/packages/toolpad-app/src/server/localMode.ts b/packages/toolpad-app/src/server/localMode.ts
index 49b669fd112..e75052bc3dc 100644
--- a/packages/toolpad-app/src/server/localMode.ts
+++ b/packages/toolpad-app/src/server/localMode.ts
@@ -352,17 +352,12 @@ function expandChildren(
dom: appDom.AppDom,
): (Query | ElementType)[];
function expandChildren(children: N[], dom: appDom.AppDom) {
- return (
- children
- .sort((child1, child2) => {
- invariant(
- child1.parentIndex && child2.parentIndex,
- 'Nodes are not children of another node',
- );
- return appDom.compareFractionalIndex(child1.parentIndex, child2.parentIndex);
- })
- .map((child) => expandFromDom(child, dom))
- );
+ return children
+ .sort((child1, child2) => {
+ invariant(child1.parentIndex && child2.parentIndex, 'Nodes are not children of another node');
+ return appDom.compareFractionalIndex(child1.parentIndex, child2.parentIndex);
+ })
+ .map((child) => expandFromDom(child, dom));
}
function undefinedWhenEmpty(obj?: O): O | undefined {
From 6440dca1c2290e00c7cae936536a60d4e9214915 Mon Sep 17 00:00:00 2001
From: Pedro Ferreira <10789765+apedroferreira@users.noreply.github.com>
Date: Fri, 6 Oct 2023 13:38:03 +0100
Subject: [PATCH 4/5] See if eslint still complains
---
test/integration/backend-basic/base.spec.ts | 2 +-
test/integration/backend-basic/baseProd.spec.ts | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/test/integration/backend-basic/base.spec.ts b/test/integration/backend-basic/base.spec.ts
index b6fb4f9918d..e8bec249c34 100644
--- a/test/integration/backend-basic/base.spec.ts
+++ b/test/integration/backend-basic/base.spec.ts
@@ -5,7 +5,7 @@ import { expectBasicPageContent } from './shared';
test.use({
ignoreConsoleErrors: [
- /The page's settings blocked the loading of a resource at http:\/\/localhost:\d+\/favicon\.ico/,
+ /The page’s settings blocked the loading of a resource at http:\/\/localhost:\d+\/favicon\.ico/,
/Failed to load resource: the server responded with a status of 404/,
],
});
diff --git a/test/integration/backend-basic/baseProd.spec.ts b/test/integration/backend-basic/baseProd.spec.ts
index edca4b666dc..3b5a70e24e6 100644
--- a/test/integration/backend-basic/baseProd.spec.ts
+++ b/test/integration/backend-basic/baseProd.spec.ts
@@ -5,7 +5,7 @@ import { expectBasicPageContent } from './shared';
test.use({
ignoreConsoleErrors: [
- /The page's settings blocked the loading of a resource at http:\/\/localhost:\d+\/favicon\.ico/,
+ /The page’s settings blocked the loading of a resource at http:\/\/localhost:\d+\/favicon\.ico/,
/Failed to load resource: the server responded with a status of 404/,
],
});
From 99e006a40583d8a22beb1b75cf5306f4b1a0445f Mon Sep 17 00:00:00 2001
From: Pedro Ferreira <10789765+apedroferreira@users.noreply.github.com>
Date: Fri, 6 Oct 2023 13:57:16 +0100
Subject: [PATCH 5/5] Disable rule in those lines
---
test/integration/backend-basic/base.spec.ts | 1 +
test/integration/backend-basic/baseProd.spec.ts | 1 +
2 files changed, 2 insertions(+)
diff --git a/test/integration/backend-basic/base.spec.ts b/test/integration/backend-basic/base.spec.ts
index e8bec249c34..80e751f0e61 100644
--- a/test/integration/backend-basic/base.spec.ts
+++ b/test/integration/backend-basic/base.spec.ts
@@ -5,6 +5,7 @@ import { expectBasicPageContent } from './shared';
test.use({
ignoreConsoleErrors: [
+ // eslint-disable-next-line material-ui/straight-quotes
/The page’s settings blocked the loading of a resource at http:\/\/localhost:\d+\/favicon\.ico/,
/Failed to load resource: the server responded with a status of 404/,
],
diff --git a/test/integration/backend-basic/baseProd.spec.ts b/test/integration/backend-basic/baseProd.spec.ts
index 3b5a70e24e6..98537fb6fbe 100644
--- a/test/integration/backend-basic/baseProd.spec.ts
+++ b/test/integration/backend-basic/baseProd.spec.ts
@@ -5,6 +5,7 @@ import { expectBasicPageContent } from './shared';
test.use({
ignoreConsoleErrors: [
+ // eslint-disable-next-line material-ui/straight-quotes
/The page’s settings blocked the loading of a resource at http:\/\/localhost:\d+\/favicon\.ico/,
/Failed to load resource: the server responded with a status of 404/,
],