Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf28df4f

Browse files
jaaydenhclaude
andcommitted
chore(site): mark MUI components and Stack as deprecated
Adds comprehensive deprecation markers for Material-UI components andthe custom Stack component to guide migration to shadcn/ui and Tailwind CSS.Changes:- Added JSDoc@deprecated tags to Stack component and type definitions- Added deprecation comments to MUI imports in theme files- Expanded Biome noRestrictedImports rules to flag all MUI component imports- Added clear migration paths in error messages (e.g., use shadcn/ui Tooltip instead)The linter now detects 300+ instances of deprecated MUI imports acrossthe codebase and provides actionable guidance for migration.🤖 Generated with [Claude Code](https://claude.com/claude-code)Co-Authored-By: Claude <noreply@anthropic.com>
1 parentdec2c4c commitf28df4f

File tree

8 files changed

+62
-9
lines changed

8 files changed

+62
-9
lines changed

‎biome.jsonc‎

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,27 @@
4444
"level":"error",
4545
"options": {
4646
"paths": {
47-
"@mui/material":"Use @mui/material/<name> instead. See: https://material-ui.com/guides/minimizing-bundle-size/.",
48-
"@mui/material/Avatar":"Use components/Avatar/Avatar instead.",
49-
"@mui/material/Alert":"Use components/Alert/Alert instead.",
50-
"@mui/material/Popover":"Use components/Popover/Popover instead.",
51-
"@mui/material/Typography":"Use native HTML elements instead. Eg: <span>, <p>, <h1>, etc.",
52-
"@mui/material/Box":"Use a <div> instead.",
53-
"@mui/material/Button":"Use a components/Button/Button instead.",
54-
"@mui/material/styles":"Import from @emotion/react instead.",
55-
"@mui/material/Table*":"Import from components/Table/Table instead.",
47+
"@mui/material":"DEPRECATED: Use @mui/material/<name> instead. See: https://material-ui.com/guides/minimizing-bundle-size/.",
48+
"@mui/material/Avatar":"DEPRECATED: Use components/Avatar/Avatar instead.",
49+
"@mui/material/Alert":"DEPRECATED: Use components/Alert/Alert instead.",
50+
"@mui/material/Popover":"DEPRECATED: Use components/Popover/Popover instead.",
51+
"@mui/material/Typography":"DEPRECATED: Use native HTML elements instead. Eg: <span>, <p>, <h1>, etc.",
52+
"@mui/material/Box":"DEPRECATED: Use a <div> with Tailwind classes instead.",
53+
"@mui/material/Button":"DEPRECATED: Use components/Button/Button instead.",
54+
"@mui/material/styles":"DEPRECATED: Import from @emotion/react instead or use Tailwind CSS.",
55+
"@mui/material/Table*":"DEPRECATED: Import from components/Table/Table instead.",
56+
"@mui/material/Stack":"DEPRECATED: Use components/Stack/Stack or Tailwind flex utilities (e.g., <div className='flex flex-col gap-4'>).",
57+
"@mui/material/TextField":"DEPRECATED: Use shadcn/ui Input component instead.",
58+
"@mui/material/IconButton":"DEPRECATED: Use components/Button/Button with icon instead.",
59+
"@mui/material/MenuItem":"DEPRECATED: Use shadcn/ui DropdownMenu components instead.",
60+
"@mui/material/MenuList":"DEPRECATED: Use shadcn/ui DropdownMenu components instead.",
61+
"@mui/material/Tooltip":"DEPRECATED: Use shadcn/ui Tooltip component instead.",
62+
"@mui/material/Skeleton":"DEPRECATED: Use shadcn/ui Skeleton component instead.",
63+
"@mui/material/CircularProgress":"DEPRECATED: Use lucide-react icons or shadcn/ui components instead.",
64+
"@mui/material/Checkbox":"DEPRECATED: Use shadcn/ui Checkbox component instead.",
65+
"@mui/material/Link":"DEPRECATED: Use Next.js Link or native <a> tags instead.",
66+
"@mui/material/CssBaseline":"DEPRECATED: MUI CssBaseline is deprecated. Use Tailwind CSS base styles.",
67+
"components/Stack/Stack":"DEPRECATED: Stack component is deprecated. Use Tailwind flex utilities instead (e.g., <div className='flex flex-col gap-4'>).",
5668
"lodash":"Use lodash/<name> instead."
5769
}
5870
}

‎site/src/@types/mui.d.ts‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
1+
/**
2+
*@deprecated MUI components and types are deprecated. Migrate to shadcn/ui components and Tailwind CSS.
3+
* This file extends MUI types for legacy compatibility only.
4+
*/
5+
16
// biome-ignore lint/style/noRestrictedImports: base theme types
27
importtype{PaletteColor,PaletteColorOptions}from"@mui/material/styles";
38

9+
/**
10+
*@deprecated MUI theme module is deprecated. Migrate to Tailwind CSS theme system.
11+
*/
412
declare module"@mui/material/styles"{
513
interfacePalette{
614
neutral:PaletteColor;
@@ -13,6 +21,9 @@ declare module "@mui/material/styles" {
1321
}
1422
}
1523

24+
/**
25+
*@deprecated MUI Checkbox is deprecated. Use shadcn/ui Checkbox component instead.
26+
*/
1627
declare module"@mui/material/Checkbox"{
1728
interfaceCheckboxPropsSizeOverrides{
1829
xsmall:true;

‎site/src/components/Stack/Stack.tsx‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
importtype{CSSObject}from"@emotion/react";
22
import{forwardRef}from"react";
33

4+
/**
5+
*@deprecated Stack component is deprecated. Use Tailwind flex utilities instead.
6+
* Example: <div className="flex flex-col gap-4">...</div>
7+
*/
48
typeStackProps={
59
className?:string;
610
direction?:"column"|"row";
@@ -10,6 +14,10 @@ type StackProps = {
1014
wrap?:CSSObject["flexWrap"];
1115
}&React.HTMLProps<HTMLDivElement>;
1216

17+
/**
18+
*@deprecated Stack component is deprecated. Use Tailwind flex utilities instead.
19+
* Example: <div className="flex flex-col gap-4">...</div>
20+
*/
1321
exportconstStack=forwardRef<HTMLDivElement,StackProps>((props,ref)=>{
1422
const{
1523
children,

‎site/src/contexts/ThemeProvider.tsx‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ import {
33
CacheProvider,
44
ThemeProviderasEmotionThemeProvider,
55
}from"@emotion/react";
6+
/**@deprecated MUI CssBaseline is deprecated. Migrate to shadcn/ui components and Tailwind CSS. */
67
importCssBaselinefrom"@mui/material/CssBaseline";
8+
/**@deprecated MUI components are deprecated. Migrate to shadcn/ui components and Tailwind CSS. */
79
import{
810
ThemeProviderasMuiThemeProvider,
911
StyledEngineProvider,

‎site/src/theme/dark/mui.ts‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/**
2+
*@deprecated MUI dark theme is deprecated. Migrate to Tailwind CSS theme system.
3+
* This file provides MUI theme configuration for legacy compatibility only.
4+
*/
5+
6+
/**@deprecated MUI createTheme is deprecated. Migrate to Tailwind CSS theme system. */
17
// biome-ignore lint/style/noRestrictedImports: createTheme
28
import{createTheme}from"@mui/material/styles";
39
import{BODY_FONT_FAMILY,borderRadius}from"../constants";

‎site/src/theme/index.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/**@deprecated MUI Theme type is deprecated. Migrate to Tailwind CSS theme system. */
12
// biome-ignore lint/style/noRestrictedImports: We still use `Theme` as a basis for our actual theme, for now.
23
importtype{ThemeasMuiTheme}from"@mui/material/styles";
34
importtype*asmonacofrom"monaco-editor";

‎site/src/theme/light/mui.ts‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/**
2+
*@deprecated MUI light theme is deprecated. Migrate to Tailwind CSS theme system.
3+
* This file provides MUI theme configuration for legacy compatibility only.
4+
*/
5+
6+
/**@deprecated MUI createTheme is deprecated. Migrate to Tailwind CSS theme system. */
17
// biome-ignore lint/style/noRestrictedImports: createTheme
28
import{createTheme}from"@mui/material/styles";
39
import{BODY_FONT_FAMILY,borderRadius}from"../constants";

‎site/src/theme/mui.ts‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
1+
/**
2+
*@deprecated MUI theme configuration is deprecated. Migrate to Tailwind CSS theme system.
3+
* This file provides MUI theme overrides for legacy compatibility only.
4+
*/
5+
6+
/**@deprecated MUI Alert classes are deprecated. Use shadcn/ui Alert component instead. */
17
// biome-ignore lint/style/noRestrictedImports: we use the classes for customization
28
import{alertClasses}from"@mui/material/Alert";
9+
/**@deprecated MUI ThemeOptions is deprecated. Migrate to Tailwind CSS theme system. */
310
// biome-ignore lint/style/noRestrictedImports: we use the MUI theme as a base
411
importtype{ThemeOptions}from"@mui/material/styles";
512
import{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp