Showing 95 of 332 total issues
Function AsyncDualSelectWidget
has 212 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const AsyncDualSelectWidget = (props: DualSelectWidgetProps): JSX.Element => {
const {
name,
style,
helpText,
Function WizardStepContainer
has 141 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const WizardStepContainer = (props: WizardViewContainerProps): JSX.Element => {
const wizardStepRef = React.useRef<WizardStepContainerRef>(null)
const {
wizard,
wizardStep,
File filters.tsx
has 383 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// Это легаси
/* eslint-disable react/jsx-props-no-spreading */
import React, { useState } from 'react'
import InputMask, { Props as InputMaskProps } from 'react-input-mask'
import { Box } from '@chakra-ui/react'
Function Bottom
has 106 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const Bottom = (props: BottonProps): JSX.Element => {
const {
resourceName,
pageIndex,
canPreviousPage,
Function RenderDetail
has 105 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const RenderDetail = (props: RenderDetailProps): JSX.Element => {
/*
Entry point for displaying components in https://myspa.com/some-url/100500 route format.
Here we fetch data from the backend using the url that we specified in a
Function ForeignKeySelectWidget
has 102 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const ForeignKeySelectWidget = (props: ForeignKeySelectWidgetProps): JSX.Element => {
const {
name,
mainDetailObject,
provider,
Function DateTimeRangeListWidget
has 96 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const DateTimeRangeListWidget = (props: DateTimeRangeWidgetProps): JSX.Element => {
const {
name,
helpText,
targetPayload,
Function ChipInput
has 96 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const ChipInput = forwardRef<HTMLInputElement, ChipInputProps>((props, ref): JSX.Element => {
const {
value: inputValue,
onChange,
placeholder,
Function AsyncDualSelectWidget
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
Open
const AsyncDualSelectWidget = (props: DualSelectWidgetProps): JSX.Element => {
const {
name,
style,
helpText,
- 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 MultiSelectWidget
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const MultiSelectWidget = (props: MultiSelectWidgetProps): JSX.Element => {
const {
name,
mainDetailObject,
optionLabel,
Function DateTimeRangeWidget
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const DateTimeRangeWidget = (props: DateTimeRangeWidgetProps): JSX.Element => {
const {
name,
helpText,
targetPayload,
Function ContainerWidget
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const ContainerWidget = (props: any): JSX.Element => {
const {
setInitialValue,
submitChange,
resourceName,
Function InputWidget
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const InputWidget = forwardRef<HTMLInputElement, InputWidgetProps>((props: InputWidgetProps, ref): JSX.Element => {
const {
name,
helpText,
targetPayload,
Function Wizard
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const Wizard = (props: WizardProps): JSX.Element => {
const {
wizard,
provider,
mainDetailObject,
Function BaseSelectWidget
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
(props: BaseSelectWidgetProps, ref): JSX.Element => {
const {
name,
helpText,
description,
Function WizardStepControlPanel
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const WizardStepControlPanel = (props: WizardStepControlPanelProps): JSX.Element => {
const {
wizardStep,
wizard,
submitChange,
Function SelectList
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
Open
export const SelectList = ({
values,
selectedValues,
getOptionLabel,
getOptionValue,
- 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 useRecordValidation
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function useRecordValidation<K extends ErrorsKey>(
useRoot: (record: RecordErrors<K>, onChange: (updater: Updater<RecordErrors<K>>) => void) => RootProviderDesc,
useCheck: (
validator: RecordValidator
) => ValidationState<Record<K, ValidationError[] | null>> & { validate: RecordValidator },
Function ForeignKeySelectFilter
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const ForeignKeySelectFilter = (params: ForeignKeySelectFilterProps): JSX.Element => {
const {
name,
label,
resourceName,
Function makeTable
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function makeTable<Components extends TableComponents, Plugin extends TablePlugin>(
tableComponents: Components,
plugins: Plugin[] = []
): <T>(
props: TableProps<