mirror of
https://github.com/coder/coder.git
synced 2026-09-01 14:53:15 +08:00
ea8ba0c678
> 🤖 This PR was modified by Coder Agents on behalf of Jake Howell. Until we meet again. ## Stack - #27636 - #27718 - #27719 - #27722 - #27723 - #27724 - #27728 - #27730 - #27732 - #27762 - #27763 - #27786 - #27787 - #27788 - #27789 - #27790 - #27791 - #27817 - #27820 - #28009 ## Final removal (`c39b664`) Removes the last of MUI and Emotion now that every surface has been migrated: - **Dependencies**: drops `@mui/material` and `@emotion/{cache,css,react,styled}` from `package.json` / `pnpm-lock.yaml`, and deletes the `@types/emotion.d.ts` and `@types/mui.d.ts` module augmentations. - **Theming**: replaces the Emotion `CacheProvider`, MUI `ThemeProvider` / `StyledEngineProvider`, and `CssBaseline` in `ThemeProvider` with a lightweight `theme/context.tsx` that exposes `ThemeContextProvider` and a `useTheme` hook. - **Global styles**: moves the base `body` styles (background, text color, font, antialiasing) that `CssBaseline` previously provided into `index.css`, and drops the temporary MUI modal/popover scrollbar-gutter workaround. - **Cleanup**: removes the MUI → shadcn / Emotion → Tailwind migration guidance from `site/AGENTS.md`, updates the Storybook `preview.tsx`, and adjusts assorted components (`Command`, `Slider`, `Switch`, `Tabs`, `SyntaxHighlighter`, timing charts) and theme files to consume the new context instead of MUI/Emotion.
127 lines
3.3 KiB
JSON
127 lines
3.3 KiB
JSON
{
|
|
"vcs": {
|
|
"enabled": true,
|
|
"clientKind": "git",
|
|
"useIgnoreFile": true,
|
|
"defaultBranch": "main"
|
|
},
|
|
"files": {
|
|
// static/*.html are Go templates with {{ }} directives that
|
|
// Biome's HTML parser does not support.
|
|
"includes": ["**", "!**/pnpm-lock.yaml", "!**/static/*.html"],
|
|
"ignoreUnknown": true,
|
|
"maxSize": 2097152
|
|
},
|
|
"linter": {
|
|
"rules": {
|
|
"a11y": {
|
|
"noSvgWithoutTitle": "off",
|
|
"useButtonType": "off",
|
|
"useSemanticElements": "off",
|
|
"noStaticElementInteractions": "off"
|
|
},
|
|
"correctness": {
|
|
"noUnusedImports": "warn",
|
|
"useUniqueElementIds": "off", // TODO: This is new but we want to fix it
|
|
"noNestedComponentDefinitions": "off", // TODO: Investigate, since it is used by shadcn components
|
|
"noUnusedVariables": {
|
|
"level": "warn",
|
|
"options": {
|
|
"ignoreRestSiblings": true
|
|
}
|
|
}
|
|
},
|
|
"style": {
|
|
"noNonNullAssertion": "off",
|
|
"noParameterAssign": "off",
|
|
"useDefaultParameterLast": "off",
|
|
"useSelfClosingElements": "off",
|
|
"useAsConstAssertion": "error",
|
|
"useEnumInitializers": "error",
|
|
"useSingleVarDeclarator": "error",
|
|
"useConsistentCurlyBraces": "error",
|
|
"noUnusedTemplateLiteral": "error",
|
|
"useNumberNamespace": "error",
|
|
"noInferrableTypes": "error",
|
|
"noUselessElse": "error",
|
|
"noRestrictedImports": {
|
|
"level": "error",
|
|
"options": {
|
|
"paths": {
|
|
"react": {
|
|
"message": "React 19 no longer requires forwardRef. Use ref as a prop instead.",
|
|
"importNames": ["forwardRef"]
|
|
},
|
|
"@pierre/diffs": {
|
|
"message": "Parse diffs through parseDiffString so every rendered file carries a content-derived cache key (pierrecomputer/pierre#1052).",
|
|
"importNames": [
|
|
"parsePatchFiles",
|
|
"processPatch",
|
|
"processFile",
|
|
"parseDiffFromFile"
|
|
]
|
|
},
|
|
// "#/components/Stack/Stack": "Use Tailwind flex utilities instead (e.g., <div className='flex flex-col gap-4'>).",
|
|
"lodash": "Use lodash/<name> instead."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"suspicious": {
|
|
"noArrayIndexKey": "off",
|
|
"noThenProperty": "off",
|
|
"noTemplateCurlyInString": "off",
|
|
"useIterableCallbackReturn": "off",
|
|
"noUnknownAtRules": "off", // Allow Tailwind directives
|
|
"noConsole": {
|
|
"level": "error",
|
|
"options": {
|
|
"allow": ["error", "info", "warn"]
|
|
}
|
|
}
|
|
},
|
|
"complexity": {
|
|
"noImportantStyles": "off", // TODO: check and fix !important styles
|
|
"useLiteralKeys": "off"
|
|
}
|
|
}
|
|
},
|
|
"css": {
|
|
"parser": {
|
|
// Biome 2.3+ requires opt-in for @apply and other
|
|
// Tailwind directives.
|
|
"tailwindDirectives": true
|
|
}
|
|
},
|
|
"overrides": [
|
|
{
|
|
// Generated Go types can produce empty interfaces; the
|
|
// safe fix conflicts with noBannedTypes.
|
|
"includes": ["**/typesGenerated.ts"],
|
|
"linter": {
|
|
"rules": {
|
|
"suspicious": {
|
|
"noEmptyInterface": "off"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
// parseDiff.ts is the single choke point allowed to import
|
|
// the raw @pierre/diffs parsers.
|
|
"includes": [
|
|
"**/DiffViewer/parseDiff.ts",
|
|
"**/DiffViewer/parseDiff.test.ts"
|
|
],
|
|
"linter": {
|
|
"rules": {
|
|
"style": {
|
|
"noRestrictedImports": "off"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json"
|
|
}
|