Showing 48 of 179 total issues
Function BusyBox
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
(
{
background,
children,
busyVariant = 'circular',
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function useMenuItemsShared
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const useMenuItemsShared = () => {
const {
collapse, collapseEnd, setCollapse, setCollapseEnd,
} = useCollapsible()
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function CoverProgress
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const CoverProgress: React.FC<CoverProgressProps> = (props) => {
const {
paper = true, open, opacity = 0.25, errors, onRetry,
} = props
const theme = useTheme()
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function AppBarExInner
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const AppBarExInner: React.FC<AppBarExProps> = ({
children, menu, contextToolbar, systemToolbar, responsive, ...props
}) => {
const { breakpoints } = useTheme()
const belowSm = useMediaQuery(breakpoints.down('sm'))
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function InvertibleCssVarsProvider
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const InvertibleCssVarsProvider: React.FC<InvertibleMuiThemeProviderProps> = ({
children,
defaultMode = 'system',
noResponsiveFontSizes,
theme,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function SimpleAccordion
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const SimpleAccordion: React.FC<SimpleAccordionCardProps> = ({
name, linkText, to, href, description, expanded, onChange, children,
}) => {
const theme = useTheme()
const isMobile = useMediaQuery(theme.breakpoints.down('md'))
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function asButtonHrefOrToProps
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const asButtonHrefOrToProps = (props: ButtonHrefAndToProps): ButtonHrefOrToOrNoProps => {
if (props.href && (props.to || props.toOptions)) {
throw new Error('ButtonExProps: cannot have both href and to')
}
return props.href ? { href: props.href } : props.to ? { to: props.to, toOptions: props.toOptions } : {}
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function asLinkHrefOrToProps
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const asLinkHrefOrToProps = (props: LinkHrefAndToProps): LinkHrefOrToOrNoProps => {
if (props.href && (props.to || props.toOptions)) {
throw new Error('LinkExProps: cannot have both href and to')
}
return props.href ? { href: props.href } : props.to ? { to: props.to, toOptions: props.toOptions } : {}
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"