Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions workspaces/orchestrator/.changeset/mui-v5-orchestrator.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@red-hat-developer-hub/backstage-plugin-orchestrator': patch
'@red-hat-developer-hub/backstage-plugin-orchestrator-form-react': patch
'@red-hat-developer-hub/backstage-plugin-orchestrator-form-widgets': patch
---

Replace Material UI v4 imports with MUI v5 and scope JSS class names to prevent style collisions.
43 changes: 43 additions & 0 deletions workspaces/orchestrator/eslint.frontend-shared.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*
* Copyright Red Hat, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

const materialUiMigrationEslintConfig = {
restrictedImports: [
{
name: '@material-ui/core',
message: 'Use @mui/material instead of Material UI v4.',
},
{
name: '@material-ui/lab',
message: 'Use @mui/material instead of Material UI v4.',
},
{
name: '@material-ui/styles',
message:
'Use @mui/styles, @mui/material (sx/styled), or Backstage UI instead of Material UI v4.',
},
],
restrictedImportPatterns: ['@material-ui/*'],
};

/**
* Shared ESLint config for frontend packages in the orchestrator workspace.
*/
module.exports = packageDir =>

Check warning on line 39 in workspaces/orchestrator/eslint.frontend-shared.cjs

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

The arrow function should be named.

See more on https://sonarcloud.io/project/issues?id=redhat-developer_rhdh-plugins&issues=AZ5JTKeZ8Mn5zsPtrbSh&open=AZ5JTKeZ8Mn5zsPtrbSh&pullRequest=3195
require('@backstage/cli/config/eslint-factory')(
packageDir,
materialUiMigrationEslintConfig,
);
3 changes: 2 additions & 1 deletion workspaces/orchestrator/packages/app-legacy/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@
* limitations under the License.
*/

module.exports = require('@backstage/cli/config/eslint-factory')(__dirname);
// eslint-disable-next-line @backstage/no-relative-monorepo-imports -- workspace ESLint shared config
module.exports = require('../../eslint.frontend-shared.cjs')(__dirname);
2 changes: 1 addition & 1 deletion workspaces/orchestrator/packages/app-legacy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"@mui/styles": "5.18.0",
"@red-hat-developer-hub/backstage-plugin-orchestrator": "workspace:^",
"@red-hat-developer-hub/backstage-plugin-orchestrator-form-widgets": "workspace:^",
"@red-hat-developer-hub/backstage-plugin-theme": "^0.12.0",
"@red-hat-developer-hub/backstage-plugin-theme": "^0.14.0",
"custom-authentication-provider-module": "workspace:^",
"history": "^5.3.0",
"react": "^18.0.2",
Expand Down

This file was deleted.

This file was deleted.

Loading
Loading