mirror of
https://github.com/coder/coder.git
synced 2026-06-02 20:48:20 +00:00
13fbbcd279
closes #19974 This PR replaces all remaining MUI tooltips with our shadcn tooltip component, and uncomments the linter restriction on importing the MUI tooltip
138 lines
7.0 KiB
JSON
138 lines
7.0 KiB
JSON
{
|
|
"vcs": {
|
|
"enabled": true,
|
|
"clientKind": "git",
|
|
"useIgnoreFile": true,
|
|
"defaultBranch": "main"
|
|
},
|
|
"files": {
|
|
"includes": ["**", "!**/pnpm-lock.yaml"],
|
|
"ignoreUnknown": true
|
|
},
|
|
"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",
|
|
"noUnusedTemplateLiteral": "error",
|
|
"useNumberNamespace": "error",
|
|
"noInferrableTypes": "error",
|
|
"noUselessElse": "error",
|
|
"noRestrictedImports": {
|
|
"level": "error",
|
|
"options": {
|
|
"paths": {
|
|
// "@mui/material/Alert": "Use components/Alert/Alert instead.",
|
|
// "@mui/material/AlertTitle": "Use components/Alert/Alert instead.",
|
|
// "@mui/material/Autocomplete": "Use shadcn/ui Combobox instead.",
|
|
"@mui/material/Avatar": "Use components/Avatar/Avatar instead.",
|
|
"@mui/material/Box": "Use a <div> with Tailwind classes instead.",
|
|
"@mui/material/Button": "Use components/Button/Button instead.",
|
|
// "@mui/material/Card": "Use shadcn/ui Card component instead.",
|
|
// "@mui/material/CardActionArea": "Use shadcn/ui Card component instead.",
|
|
// "@mui/material/CardContent": "Use shadcn/ui Card component instead.",
|
|
// "@mui/material/Checkbox": "Use shadcn/ui Checkbox component instead.",
|
|
// "@mui/material/Chip": "Use components/Badge or Tailwind styles instead.",
|
|
// "@mui/material/CircularProgress": "Use components/Spinner/Spinner instead.",
|
|
// "@mui/material/Collapse": "Use shadcn/ui Collapsible instead.",
|
|
// "@mui/material/CssBaseline": "Use Tailwind CSS base styles instead.",
|
|
// "@mui/material/Dialog": "Use shadcn/ui Dialog component instead.",
|
|
// "@mui/material/DialogActions": "Use shadcn/ui Dialog component instead.",
|
|
// "@mui/material/DialogContent": "Use shadcn/ui Dialog component instead.",
|
|
// "@mui/material/DialogContentText": "Use shadcn/ui Dialog component instead.",
|
|
// "@mui/material/DialogTitle": "Use shadcn/ui Dialog component instead.",
|
|
// "@mui/material/Divider": "Use shadcn/ui Separator or <hr> with Tailwind instead.",
|
|
// "@mui/material/Drawer": "Use shadcn/ui Sheet component instead.",
|
|
// "@mui/material/FormControl": "Use native form elements with Tailwind instead.",
|
|
// "@mui/material/FormControlLabel": "Use shadcn/ui Label with form components instead.",
|
|
// "@mui/material/FormGroup": "Use a <div> with Tailwind classes instead.",
|
|
// "@mui/material/FormHelperText": "Use a <p> with Tailwind classes instead.",
|
|
// "@mui/material/FormLabel": "Use shadcn/ui Label component instead.",
|
|
// "@mui/material/Grid": "Use Tailwind grid utilities instead.",
|
|
// "@mui/material/IconButton": "Use components/Button/Button with variant='icon' instead.",
|
|
// "@mui/material/InputAdornment": "Use Tailwind positioning in input wrapper instead.",
|
|
// "@mui/material/InputBase": "Use shadcn/ui Input component instead.",
|
|
// "@mui/material/LinearProgress": "Use a progress bar with Tailwind instead.",
|
|
// "@mui/material/Link": "Use React Router Link or native <a> tags instead.",
|
|
// "@mui/material/List": "Use native <ul> with Tailwind instead.",
|
|
// "@mui/material/ListItem": "Use native <li> with Tailwind instead.",
|
|
// "@mui/material/ListItemIcon": "Use lucide-react icons in list items instead.",
|
|
// "@mui/material/ListItemText": "Use native elements with Tailwind instead.",
|
|
// "@mui/material/Menu": "Use shadcn/ui DropdownMenu instead.",
|
|
// "@mui/material/MenuItem": "Use shadcn/ui DropdownMenu components instead.",
|
|
// "@mui/material/MenuList": "Use shadcn/ui DropdownMenu components instead.",
|
|
// "@mui/material/Paper": "Use a <div> with Tailwind shadow/border classes instead.",
|
|
"@mui/material/Popover": "Use components/Popover/Popover instead.",
|
|
// "@mui/material/Radio": "Use shadcn/ui RadioGroup instead.",
|
|
// "@mui/material/RadioGroup": "Use shadcn/ui RadioGroup instead.",
|
|
// "@mui/material/Select": "Use shadcn/ui Select component instead.",
|
|
// "@mui/material/Skeleton": "Use shadcn/ui Skeleton component instead.",
|
|
// "@mui/material/Snackbar": "Use components/GlobalSnackbar instead.",
|
|
// "@mui/material/Stack": "Use Tailwind flex utilities instead (e.g., <div className='flex flex-col gap-4'>).",
|
|
// "@mui/material/styles": "Use Tailwind CSS instead.",
|
|
// "@mui/material/SvgIcon": "Use lucide-react icons instead.",
|
|
// "@mui/material/Switch": "Use shadcn/ui Switch component instead.",
|
|
"@mui/material/Table": "Import from components/Table/Table instead.",
|
|
// "@mui/material/TableRow": "Import from components/Table/Table instead.",
|
|
// "@mui/material/TextField": "Use shadcn/ui Input component instead.",
|
|
// "@mui/material/ToggleButton": "Use shadcn/ui Toggle or custom component instead.",
|
|
// "@mui/material/ToggleButtonGroup": "Use shadcn/ui Toggle or custom component instead.",
|
|
"@mui/material/Tooltip": "Use components/Tooltip/Tooltip instead.",
|
|
"@mui/material/Typography": "Use native HTML elements instead. Eg: <span>, <p>, <h1>, etc.",
|
|
// "@mui/material/useMediaQuery": "Use Tailwind responsive classes or custom hook instead.",
|
|
// "@mui/system": "Use Tailwind CSS instead.",
|
|
// "@mui/utils": "Use native alternatives or utility libraries instead.",
|
|
// "@mui/x-tree-view": "Use a Tailwind-compatible alternative.",
|
|
// "@emotion/css": "Use Tailwind CSS instead.",
|
|
// "@emotion/react": "Use Tailwind CSS instead.",
|
|
"@emotion/styled": "Use Tailwind CSS instead.",
|
|
// "@emotion/cache": "Use Tailwind CSS instead.",
|
|
// "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
|
|
}
|
|
}
|
|
},
|
|
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json"
|
|
}
|