Showing 165 of 459 total issues
Function AsyncFormSelect
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
export function AsyncFormSelect(props: IProps) {
const { _ } = useLingui();
const { input, url, referenceUrl } = props;
- 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 EntityRelationDetails
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
export function EntityRelationDetails() {
const childEntity = useRouteParam("childEntity");
const childEntityCrudConfig = useEntityCrudConfig(childEntity);
const entityId = useEntityId();
const parentEntity = useEntitySlug();
- 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 AccountProfile
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function AccountProfile() {
const authenticatedUserBag = useAuthenticatedUserBag();
const updateProfileMutation = useUpdateProfileMutation();
const domainMessages = useDomainMessages(LANG_DOMAINS.ACCOUNT.PROFILE);
Function useTableState
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const useTableState = (
contextKey: string,
persistentFilters: IDataTableProps["persistentFilters"],
defaultTableState?: IDataTableProps["defaultTableState"]
) => {
Function create
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
async create(
entity: string,
data: Record<string, unknown>,
accountProfile: IAccountProfile
): Promise<string | number> {
Function render
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const { error } = this.state;
const { children } = this.props;
if (error) {
return (
Function GET
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
GET: async (): Promise<Record<string, string>> => {
const latestVersion$1 = await latestVersion("dashpress");
const versionText =
latestVersion$1 === version
Function createConfigDomainPersistenceService
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function createConfigDomainPersistenceService<T>(
configDomain: ConfigDomain
): AbstractConfigDataPersistenceService<T> {
const configBag: Record<
ConfigAdaptorTypes,
Function showData
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
async showData(
entity: string,
id: string | number,
column?: string
): Promise<Record<string, unknown>> {
Function getEntitySelections
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const getEntitySelections = (
entityFields: IEntityField[],
entitySelections: Record<string, IColorableSelection[]>,
entityFieldTypes: Record<string, FormFieldTypes>
): Record<string, IColorableSelection[]> => {
Function ListManager
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
export function ListManager<T, K extends StringProps<T>>({
labelField,
listLengthGuess,
getLabel,
items,
- 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 SoftButton
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
export function SoftButton({
label,
size,
systemIcon,
shouldConfirmAlert,
- 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 SideBar
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
export function SideBar({ isFullWidth, setIsFullWidth }: IProps) {
const siteConfig = useAppConfiguration("site_settings");
const navigationMenuItems = useNavigationMenuItems();
const [activeItem, setActiveItem$1] = useSessionStorage<
- 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 isAuthenticatedValidationImpl
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
export const isAuthenticatedValidationImpl: ValidationImplType<void> = async (
req,
protectedRoute: boolean
) => {
try {
- 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 WidgetFrameCmp
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function WidgetFrameCmp(
{ setting, config, type, data, isPreview, Component },
ref
) {
const navigationLink = useWidgetNavigationLink(
- 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 useApiMutateOptimisticOptions
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
export function useApiMutateOptimisticOptions<T, V, R = void>(
options: IApiMutateOptions<T, V, R>
) {
const apiMutate = useApiMutate<T>(options.dataQueryPath);
const queryClient = useQueryClient();
- 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 parseForm
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export async function parseForm(
req: NextApiRequest
): Promise<{ fields: formidable.Fields; files: formidable.Files }> {
const fileUploadSettings = await configurationApiService.show(
"file_upload_settings"
- 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 useEntityCrudView
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function useEntityCrudView(entity: string) {
const entityCrudSettings = useEntityCrudSettings(entity);
const entityFields = useEntityFields(entity);
const upsertCrudSettingsMutation = useUpsertConfigurationMutation(
- 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 DetailsLayout
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export function DetailsLayout({
children,
entity,
menuKey,
menuItems = [],
- 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 handleValidation
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
(
validate: (
value: unknown,
parameter?: unknown,
allValues?: Record<string, unknown>
- 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"