Showing 150 of 428 total issues
Function VersionInfo
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function VersionInfo() {
const domainMessages = useDomainMessages({
plural: msg`System Info`,
singular: msg`System Info`,
});
Function EntityPersistentQuerySettings
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function EntityPersistentQuerySettings() {
const entity = useEntitySlug();
const domainMessages = useAppConfigurationDomainMessages("persistent_query");
const upsertPeristentQueryMutation = useUpsertConfigurationMutation(
Function SignIn
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const SignIn: CustomNextPage = () => {
const render = useGuestCheck();
const signInMutation = useSignInMutation();
const setupCheck = useSetupCheck([
Function EntityUpdate
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function EntityUpdate() {
const entityId = useEntityId();
const entity = useEntitySlug();
useDataUpdateActions({ entity, entityId });
Function BaseManageVariables
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function BaseManageVariables() {
const [currentTab, setCurrentTab] = useState<IntegrationsConfigurationGroup>(
IntegrationsConfigurationGroup.Constants
);
const constantsDomainMessages = useDomainMessages(
Function UserSetup
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const UserSetup: CustomNextPage = () => {
const setupUserMutation = useSetupUserMutation();
const isChecking = useSetupCheck([
{
Function EntityFormExtensionSettings
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function EntityFormExtensionSettings() {
const entity = useEntitySlug();
const domainMessages = useAppConfigurationDomainMessages(
"entity_form_extension"
Function FormSwitch
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function FormSwitch(props: IProps) {
const { value, onChange, name, disabled, label, ...rest } = props;
const ariaProps = Object.fromEntries(
typescriptSafeObjectDotEntries(rest as Record<string, string>).filter(
([key]) => String(key).startsWith("aria-")
Function assertConfiguration
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
assertConfiguration() {
if (ConfigApiService.isInitialized) {
return;
}
ConfigApiService.isInitialized = true;
Function update
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
async update(
entity: string,
id: string,
data: Record<string, unknown>,
accountProfile: IAccountProfile,
Function runValidationError
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
(fields: IAppliedSchemaFormConfig<any>) =>
(values: Record<string, unknown>) => {
const validations = Object.fromEntries(
typescriptSafeObjectDotEntries(fields).map(([field, config]) => {
const validationsToRun = config.validations || [];
- 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 MetaDataSettings
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
function MetaDataSettings() {
const domainMessages = useAppConfigurationDomainMessages("metadata_columns");
const metaDataColumns = useAppConfiguration("metadata_columns");
Function useApiMutateOptimisticOptions
has 39 lines of code (exceeds 25 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();
Function runValidationError
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
(values: Record<string, unknown>) => {
const validations = Object.fromEntries(
typescriptSafeObjectDotEntries(fields).map(([field, config]) => {
const validationsToRun = config.validations || [];
Function FormSelectButton
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function FormSelectButton(formInput: IFormSelect) {
const { input, selectData, disabled, sm } = formInput;
const { _ } = useLingui();
return (
Function getEntitySelectionConfig
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const getEntitySelectionConfig = (
entityType: EntityTypesForSelection,
preSelectedType: IColorableSelection[],
enumList$1: string[]
): IColorableSelection[] => {
Function SoftButton
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
export function SoftButton({
label,
block,
size = "sm",
systemIcon,
- 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 useWaitForResponseMutationOptions
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
export function useWaitForResponseMutationOptions<V, R = void>(
options: IWaitForResponseMutationOptions<V, R>
) {
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 useTableColumns
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
export const useTableColumns = (
entity: string
): Partial<DataStateKeys<ITableColumn[]>> => {
const portalTableColumns = usePortalTableColumns(entity);
const getEntityFieldLabels = useEntityFieldLabels(entity);
- 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 runFormAction
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const runFormAction = async (
entity: string,
dataEventAction: DataEventActions,
getData: () => Promise<Record<string, unknown>>,
authProfile: IAccountProfile