add mui lint rule
Signed-off-by: Juan Pablo Garcia Ripa <sarabadu@gmail.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/dev-utils': patch
|
||||
---
|
||||
|
||||
add @backstage/no-top-level-material-ui-4-imports lint rule
|
||||
@@ -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-material-ui-4-imports': 'error',
|
||||
},
|
||||
});
|
||||
|
||||
@@ -10,7 +10,7 @@ import { AppTheme } from '@backstage/core-plugin-api';
|
||||
import { BackstagePlugin } from '@backstage/core-plugin-api';
|
||||
import { ComponentType } from 'react';
|
||||
import { Entity } from '@backstage/catalog-model';
|
||||
import { GridProps } from '@material-ui/core';
|
||||
import { GridProps } from '@material-ui/core/Grid';
|
||||
import { IconComponent } from '@backstage/core-plugin-api';
|
||||
import { PropsWithChildren } from 'react';
|
||||
import { ReactNode } from 'react';
|
||||
|
||||
@@ -16,7 +16,8 @@
|
||||
|
||||
import { Entity } from '@backstage/catalog-model';
|
||||
import { EntityProvider } from '@backstage/plugin-catalog-react';
|
||||
import { Grid, GridProps, Theme, makeStyles } from '@material-ui/core';
|
||||
import Grid, { GridProps } from '@material-ui/core/Grid';
|
||||
import { Theme, makeStyles } from '@material-ui/core/styles';
|
||||
import React from 'react';
|
||||
|
||||
const useStyles = makeStyles<Theme, { entity: Entity }>(theme => ({
|
||||
|
||||
@@ -15,7 +15,10 @@
|
||||
*/
|
||||
import { SidebarItem } from '@backstage/core-components';
|
||||
import { appThemeApiRef, useApi } from '@backstage/core-plugin-api';
|
||||
import { ListItemIcon, ListItemText, Menu, MenuItem } from '@material-ui/core';
|
||||
import ListItemIcon from '@material-ui/core/ListItemIcon';
|
||||
import ListItemText from '@material-ui/core/ListItemText';
|
||||
import Menu from '@material-ui/core/Menu';
|
||||
import MenuItem from '@material-ui/core/MenuItem';
|
||||
import AutoIcon from '@material-ui/icons/BrightnessAuto';
|
||||
import React, { cloneElement, useCallback, useState } from 'react';
|
||||
import useObservable from 'react-use/esm/useObservable';
|
||||
|
||||
@@ -42,7 +42,7 @@ import {
|
||||
ScmIntegrationsApi,
|
||||
scmIntegrationsApiRef,
|
||||
} from '@backstage/integration-react';
|
||||
import { Box } from '@material-ui/core';
|
||||
import Box from '@material-ui/core/Box';
|
||||
import BookmarkIcon from '@material-ui/icons/Bookmark';
|
||||
import React, { ComponentType, ReactNode, PropsWithChildren } from 'react';
|
||||
import { createRoutesFromChildren, Route } from 'react-router-dom';
|
||||
|
||||
Reference in New Issue
Block a user