Showing 124 of 486 total issues
Avoid too many return
statements within this function. Open
return <BridgeSummary mod={mod} {...props} />
Avoid too many return
statements within this function. Open
return true
Avoid too many return
statements within this function. Open
return <SentinelSummary mod={mod} {...props} />
Function ReflectionGroupViewer
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const ReflectionGroupViewer: React.FC<ReflectionGroupViewerProps> = ({
autoScroll = false,
children,
hiddenFlags,
group,
- 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 ActiveBoundWitnessProvider
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const ActiveBoundWitnessProvider: React.FC<ActiveBoundWitnessProviderProps> = ({
children,
activeBoundWitnessHash: activeBoundWitnessHashProp,
archivist,
}) => {
- 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 PointsMapInner
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const PointsMapInner: React.FC<PointsMapInnerProps> = ({
accessToken, payload, ...props
}) => {
const theme = useTheme()
const locationAnswerPayload = payload && isNetworkLocationAnswer(payload) ? payload : undefined
- 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 TypedModuleSummary
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const TypedModuleSummary: React.FC<ModuleSummaryProps> = ({ mod, ...props }) => {
if (isArchivistInstance(mod)) {
return <ArchivistSummary mod={mod} {...props} />
}
if (isDivinerInstance(mod)) {
- 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 AddressRenderRowBox
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
(
{
address, children, disableSharedRef, favorite: favoriteProp = false, iconOnly, iconSize = 24, icons, name, showFavorite = false, ...props
},
ref,
- 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 toggleDebugLogging
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
static toggleDebugLogging(value: boolean | undefined, map: Map) {
const debugEvents: MapEventType[] = ['resize', 'zoomend', 'dragend']
if (value) {
// initial values
this.mapListeners.logData(undefined, map)
- 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 getRemainingRowWidth
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const getRemainingRowWidth = (row: HTMLElement, forCell = 0) => {
let width = 0
for (let i = 0; i < (row?.childElementCount ?? 0); i++) {
const item = row?.children.item(i)
if (item && i !== forCell) {
- 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 navigateWithUsername
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const navigateWithUsername = (xnsName: string, paramsString: string, navigate?: ((to: string) => void), to?: To) => {
// avoid duplicating the username param
const params = new URLSearchParams(paramsString)
const usernameParam = params.get('username')
if (usernameParam) {
- 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 PayloadDynamicTable
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const PayloadDynamicTable: React.FC<PayloadDynamicTableProps> = ({
archive,
children,
columns,
exploreDomain,
- 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 CollapseToggleFlex
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const CollapseToggleFlex: React.FC<FlexBoxProps> = (props) => {
const {
collapse, setCollapse, setCollapseEnd,
} = useCollapsible()
const [hover, setHover] = useState(false)
- 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 XnsNameCaptureErrors
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const XnsNameCaptureErrors: React.FC<XnsNameCaptureErrorsProps> = ({
error, errorUi, resetError,
}) => {
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 resolveChildren
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const resolveChildren = <T extends SomeReflection>(reflection: ReflectionWithChildren, lookup: ReflectionLookup = {}): T[] => {
return (reflection.children?.map((child) => {
switch (typeof child) {
case 'object': {
return child
- 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 useFetchHuri
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const useFetchHuri = (hashOrHuri?: string, diviner?: DivinerInstance, token?: string) => {
const huri = useBuildHuri(hashOrHuri) ?? hashOrHuri
const huriPayload: HuriPayload | undefined = useMemo(
() => (huri
? {
- 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 SavedPhraseTextField
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const SavedPhraseTextField: React.FC<SavedPhraseTextFieldProps> = ({
fullWidth, showPhraseHeader, ...props
}) => {
const { validSeedPhrase, seedPhrase } = useSeedPhrase()
- 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 DynamicTokenComparison
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const DynamicTokenComparison: React.FC<TokenComparisonSummaryProps> = ({ tokenPayload }) => {
const [baseToken0, setBaseToken0] = useState(true)
const [tokenInfo0, tokenInfo1] = useGetTokenData([tokenPayload.tokens[baseToken0 ? 0 : 1].symbol, tokenPayload.tokens[baseToken0 ? 1 : 0].symbol])
const token0 = tokenPayload.tokens[baseToken0 ? 0 : 1]
const token1 = tokenPayload.tokens[baseToken0 ? 1 : 0]
- 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 BoundWitnessSignatureTableRow
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const BoundWitnessSignatureTableRow: React.FC<BoundWitnessSignatureTableRowProps> = ({
address,
archive,
clickableFields,
hash,
- 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"