From 4aff4e2e49a2e9bc7966c6afc09bfb003dc738e7 Mon Sep 17 00:00:00 2001 From: Bharat Kashyap Date: Tue, 16 May 2023 16:47:51 +0530 Subject: [PATCH 1/5] Upgrade monorepo --- yarn.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yarn.lock b/yarn.lock index 65313a4cf29..897b4527b97 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1417,8 +1417,8 @@ react-transition-group "^4.4.5" "@mui/monorepo@https://github.com/mui/material-ui.git": - version "5.12.3" - resolved "https://github.com/mui/material-ui.git#086becb197899ca7295d5d9559dbcfb2450caaaa" + version "5.13.0" + resolved "https://github.com/mui/material-ui.git#ea7201aa8f2cc6295d9c51b866b595757ad992c4" "@mui/private-theming@^5.12.3": version "5.12.3" From 1bd087d92e45cea58c27cfbe9a88614e0cd075bc Mon Sep 17 00:00:00 2001 From: Bharat Kashyap Date: Tue, 16 May 2023 17:49:09 +0530 Subject: [PATCH 2/5] Fix: eslint --- packages/toolpad-app/cli.js | 1 - packages/toolpad-app/src/toolpad/AppEditor/BindingEditor.tsx | 1 - .../src/toolpad/AppEditor/PageEditor/BindableEditor.tsx | 1 - 3 files changed, 3 deletions(-) diff --git a/packages/toolpad-app/cli.js b/packages/toolpad-app/cli.js index b6c567efb1c..40c4a34b83a 100755 --- a/packages/toolpad-app/cli.js +++ b/packages/toolpad-app/cli.js @@ -1,5 +1,4 @@ #!/usr/bin/env node -/* eslint-disable */ const { default: cli } = require('./dist/cli'); diff --git a/packages/toolpad-app/src/toolpad/AppEditor/BindingEditor.tsx b/packages/toolpad-app/src/toolpad/AppEditor/BindingEditor.tsx index 950bac02017..2f42e6eebae 100644 --- a/packages/toolpad-app/src/toolpad/AppEditor/BindingEditor.tsx +++ b/packages/toolpad-app/src/toolpad/AppEditor/BindingEditor.tsx @@ -51,7 +51,6 @@ import TabPanel from '../../components/TabPanel'; import { useDom } from '../AppState'; import * as appDom from '../../appDom'; -// eslint-disable-next-line import/no-cycle import BindableEditor from './PageEditor/BindableEditor'; interface BindingEditorContext { diff --git a/packages/toolpad-app/src/toolpad/AppEditor/PageEditor/BindableEditor.tsx b/packages/toolpad-app/src/toolpad/AppEditor/PageEditor/BindableEditor.tsx index 2ed87c05c8b..e7f0245fc9e 100644 --- a/packages/toolpad-app/src/toolpad/AppEditor/PageEditor/BindableEditor.tsx +++ b/packages/toolpad-app/src/toolpad/AppEditor/PageEditor/BindableEditor.tsx @@ -9,7 +9,6 @@ import { } from '@mui/toolpad-core'; import { WithControlledProp } from '../../../utils/types'; import { getDefaultControl } from '../../propertyControls'; -// eslint-disable-next-line import/no-cycle import { BindingEditor } from '../BindingEditor'; function renderDefaultControl(params: RenderControlParams) { From 2a823c078b6ee8382afdd69b9a1cb61a49a7a0d3 Mon Sep 17 00:00:00 2001 From: Bharat Kashyap Date: Tue, 16 May 2023 18:02:35 +0530 Subject: [PATCH 3/5] Does this work --- packages/toolpad-app/cli.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/toolpad-app/cli.js b/packages/toolpad-app/cli.js index 40c4a34b83a..917f3cb9d41 100755 --- a/packages/toolpad-app/cli.js +++ b/packages/toolpad-app/cli.js @@ -1,5 +1,5 @@ #!/usr/bin/env node - +// eslint-disable-next-line import/no-unresolved, import/extensions const { default: cli } = require('./dist/cli'); cli(process.argv.slice(2)); From ebe5272e5f0913677a588f96ef43640df893f95e Mon Sep 17 00:00:00 2001 From: Bharat Kashyap Date: Wed, 17 May 2023 16:34:31 +0530 Subject: [PATCH 4/5] Bring back import/no-cycle --- .eslintrc.js | 1 + packages/toolpad-app/cli.js | 2 +- packages/toolpad-app/src/toolpad/AppEditor/BindingEditor.tsx | 1 + .../src/toolpad/AppEditor/PageEditor/BindableEditor.tsx | 1 + 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.eslintrc.js b/.eslintrc.js index 32826728b3f..f129973f5f7 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -14,6 +14,7 @@ module.exports = { rules: { ...baseline.rules, 'import/prefer-default-export': ['off'], + 'import/no-cycle': ['error', { ignoreExternal: true }], // TODO move rule into the main repo once it has upgraded '@typescript-eslint/return-await': ['off'], diff --git a/packages/toolpad-app/cli.js b/packages/toolpad-app/cli.js index 917f3cb9d41..40c4a34b83a 100755 --- a/packages/toolpad-app/cli.js +++ b/packages/toolpad-app/cli.js @@ -1,5 +1,5 @@ #!/usr/bin/env node -// eslint-disable-next-line import/no-unresolved, import/extensions + const { default: cli } = require('./dist/cli'); cli(process.argv.slice(2)); diff --git a/packages/toolpad-app/src/toolpad/AppEditor/BindingEditor.tsx b/packages/toolpad-app/src/toolpad/AppEditor/BindingEditor.tsx index 2f42e6eebae..950bac02017 100644 --- a/packages/toolpad-app/src/toolpad/AppEditor/BindingEditor.tsx +++ b/packages/toolpad-app/src/toolpad/AppEditor/BindingEditor.tsx @@ -51,6 +51,7 @@ import TabPanel from '../../components/TabPanel'; import { useDom } from '../AppState'; import * as appDom from '../../appDom'; +// eslint-disable-next-line import/no-cycle import BindableEditor from './PageEditor/BindableEditor'; interface BindingEditorContext { diff --git a/packages/toolpad-app/src/toolpad/AppEditor/PageEditor/BindableEditor.tsx b/packages/toolpad-app/src/toolpad/AppEditor/PageEditor/BindableEditor.tsx index e7f0245fc9e..2ed87c05c8b 100644 --- a/packages/toolpad-app/src/toolpad/AppEditor/PageEditor/BindableEditor.tsx +++ b/packages/toolpad-app/src/toolpad/AppEditor/PageEditor/BindableEditor.tsx @@ -9,6 +9,7 @@ import { } from '@mui/toolpad-core'; import { WithControlledProp } from '../../../utils/types'; import { getDefaultControl } from '../../propertyControls'; +// eslint-disable-next-line import/no-cycle import { BindingEditor } from '../BindingEditor'; function renderDefaultControl(params: RenderControlParams) { From 2063b59d2d262e158cf9b574efb5ae7f37d30a8a Mon Sep 17 00:00:00 2001 From: Bharat Kashyap Date: Wed, 17 May 2023 18:35:39 +0530 Subject: [PATCH 5/5] Use override and eslint-disable cli --- .eslintrc.js | 4 +++- packages/toolpad-app/cli.js | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.eslintrc.js b/.eslintrc.js index f129973f5f7..ce5cb7f1bb3 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -14,7 +14,6 @@ module.exports = { rules: { ...baseline.rules, 'import/prefer-default-export': ['off'], - 'import/no-cycle': ['error', { ignoreExternal: true }], // TODO move rule into the main repo once it has upgraded '@typescript-eslint/return-await': ['off'], @@ -102,6 +101,9 @@ module.exports = { // https://github.com/mui/material-ui/blob/9737bc85bb6960adb742e7709e9c3710c4b6cedd/.eslintrc.js#L359 files: ['packages/*/src/**/*{.ts,.tsx,.js}'], excludedFiles: ['*.d.ts', '*.spec.ts', '*.spec.tsx'], + rules: { + 'import/no-cycle': ['error', { ignoreExternal: true }], + }, }, { files: ['packages/toolpad-core/**/*', 'packages/toolpad-components/**/*'], diff --git a/packages/toolpad-app/cli.js b/packages/toolpad-app/cli.js index 40c4a34b83a..b6c567efb1c 100755 --- a/packages/toolpad-app/cli.js +++ b/packages/toolpad-app/cli.js @@ -1,4 +1,5 @@ #!/usr/bin/env node +/* eslint-disable */ const { default: cli } = require('./dist/cli');