Added new @backstage/no-top-level-mui4-imports rule

Signed-off-by: Andre Wanlin <awanlin@spotify.com>
This commit is contained in:
Andre Wanlin
2023-12-21 20:08:08 -06:00
parent 56d3373c82
commit 995d2809b8
28 changed files with 351 additions and 55 deletions
+5 -1
View File
@@ -1 +1,5 @@
module.exports = require('@backstage/cli/config/eslint-factory')(__dirname);
module.exports = require('@backstage/cli/config/eslint-factory')(__dirname, {
rules: {
'@backstage/no-top-level-mui4-imports': 'error',
},
});
@@ -14,7 +14,7 @@
* limitations under the License.
*/
import { SvgIcon, SvgIconProps } from '@material-ui/core';
import SvgIcon, { SvgIconProps } from '@material-ui/core/SvgIcon';
import React from 'react';
@@ -14,7 +14,7 @@
* limitations under the License.
*/
import { SvgIcon, SvgIconProps } from '@material-ui/core';
import SvgIcon, { SvgIconProps } from '@material-ui/core/SvgIcon';
import React from 'react';
@@ -15,7 +15,7 @@
*/
import React from 'react';
import { SvgIcon, SvgIconProps } from '@material-ui/core';
import SvgIcon, { SvgIconProps } from '@material-ui/core/SvgIcon';
/** @public */
export const AzurePullRequestsIcon = (props: SvgIconProps) => (
@@ -14,7 +14,8 @@
* limitations under the License.
*/
import { Box, Typography } from '@material-ui/core';
import Box from '@material-ui/core/Box';
import Typography from '@material-ui/core/Typography';
import {
BuildResult,
BuildRun,
@@ -14,7 +14,7 @@
* limitations under the License.
*/
import { Box } from '@material-ui/core';
import Box from '@material-ui/core/Box';
import {
Link,
ResponseErrorPanel,
@@ -14,7 +14,8 @@
* limitations under the License.
*/
import { Button, ButtonGroup } from '@material-ui/core';
import Button from '@material-ui/core/Button';
import ButtonGroup from '@material-ui/core/ButtonGroup';
import { PullRequestStatus } from '@backstage/plugin-azure-devops-common';
import React from 'react';
@@ -14,7 +14,8 @@
* limitations under the License.
*/
import { Box, Chip } from '@material-ui/core';
import Box from '@material-ui/core/Box';
import Chip from '@material-ui/core/Chip';
import {
Link,
ResponseErrorPanel,
@@ -15,7 +15,9 @@
*/
import { Avatar, Link } from '@backstage/core-components';
import { Card, CardContent, CardHeader } from '@material-ui/core';
import Card from '@material-ui/core/Card';
import CardContent from '@material-ui/core/CardContent';
import CardHeader from '@material-ui/core/CardHeader';
import Typography from '@material-ui/core/Typography';
import { AutoCompleteIcon } from '../AutoCompleteIcon';
@@ -17,7 +17,7 @@
import { PullRequestGridColumn } from '../PullRequestGridColumn';
import { PullRequestGroup } from '../types';
import React from 'react';
import { styled } from '@material-ui/core';
import { styled } from '@material-ui/core/styles';
const GridDiv = styled('div')(({ theme }) => ({
display: 'flex',
@@ -14,7 +14,9 @@
* limitations under the License.
*/
import { Paper, Typography, styled, withStyles } from '@material-ui/core';
import Paper from '@material-ui/core/Paper';
import Typography from '@material-ui/core/Typography';
import { styled, withStyles } from '@material-ui/core/styles';
import { PullRequestCard } from '../PullRequestCard';
import { PullRequestGroup } from '../types';
@@ -14,7 +14,9 @@
* limitations under the License.
*/
import { Box, Button, makeStyles } from '@material-ui/core';
import Box from '@material-ui/core/Box';
import Button from '@material-ui/core/Button';
import { makeStyles } from '@material-ui/core/styles';
import {
InfoCard,
Progress,