fix eslint autofix for mui ThemeProvider
Signed-off-by: Juan Pablo Garcia Ripa <sarabadu@gmail.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/eslint-plugin': patch
|
||||
---
|
||||
|
||||
eslint autofix for mui ThemeProvider
|
||||
@@ -16,6 +16,7 @@ api
|
||||
asciidoc
|
||||
async
|
||||
Atlassian
|
||||
autofix
|
||||
automations
|
||||
autoscaling
|
||||
Autoscaling
|
||||
|
||||
@@ -23,6 +23,7 @@ const KNOWN_STYLES = [
|
||||
'styled',
|
||||
'useTheme',
|
||||
'Theme',
|
||||
'ThemeProvider',
|
||||
];
|
||||
|
||||
/** @type {import('eslint').Rule.RuleModule} */
|
||||
|
||||
@@ -57,6 +57,11 @@ import Typography from '@material-ui/core/Typography';`,
|
||||
errors: [{ messageId: 'topLevelImport' }],
|
||||
output: `import Box from '@material-ui/core/Box';`,
|
||||
},
|
||||
{
|
||||
code: `import { ThemeProvider } from '@material-ui/core';`,
|
||||
errors: [{ messageId: 'topLevelImport' }],
|
||||
output: `import { ThemeProvider } from '@material-ui/core/styles';`,
|
||||
},
|
||||
{
|
||||
code: `import {
|
||||
Box,
|
||||
@@ -65,6 +70,7 @@ import Typography from '@material-ui/core/Typography';`,
|
||||
DialogTitle,
|
||||
Grid,
|
||||
makeStyles,
|
||||
ThemeProvider,
|
||||
} from '@material-ui/core';`,
|
||||
errors: [{ messageId: 'topLevelImport' }],
|
||||
output: `import Box from '@material-ui/core/Box';
|
||||
@@ -72,7 +78,7 @@ import DialogActions from '@material-ui/core/DialogActions';
|
||||
import DialogContent from '@material-ui/core/DialogContent';
|
||||
import DialogTitle from '@material-ui/core/DialogTitle';
|
||||
import Grid from '@material-ui/core/Grid';
|
||||
import { makeStyles } from '@material-ui/core/styles';`,
|
||||
import { makeStyles, ThemeProvider } from '@material-ui/core/styles';`,
|
||||
},
|
||||
{
|
||||
code: `import { Box, Button, makeStyles } from '@material-ui/core';`,
|
||||
|
||||
Reference in New Issue
Block a user