Showing 165 of 459 total issues
Function FormSelectButton
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function FormSelectButton(formInput: IFormSelect) {
const { input, selectData, disabled, size } = formInput;
const { _ } = useLingui();
return (
Function EntityCreate
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function EntityCreate() {
const routeParams = useRouteParams();
const entity = useEntitySlug();
const entityCrudConfig = useEntityCrudConfig(entity);
Function ActionsIntegrations
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function ActionsIntegrations() {
const currentKey = useRouteParam("key");
const domainMessages = useDomainMessages(LANG_DOMAINS.INTEGRATIONS.ACTIONS);
const integrationsList = useIntegrationsList();
Function ManageCredentialGroup
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
export function ManageCredentialGroup({
group,
currentTab,
}: {
group: IntegrationsConfigurationGroup;
- 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 useApi
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
export function useApi<T>(endPoint: string, options: IUseApiOptions<T>) {
const isRestoring = useIsRestoring();
const builtOptions = buildApiOptions(options);
const router = useRouter();
- 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 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 Toaster
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function Toaster() {
const { toasts } = useToast();
const { _ } = useLingui();
return (
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 ThemeSettings
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function ThemeSettings() {
const themeColor = useAppConfiguration("theme_color");
const domainMessages = useAppConfigurationDomainMessages("theme_color");
const upsertConfigurationMutation =
Function VersionInfo
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function VersionInfo() {
const domainMessages = useDomainMessages({
plural: msg`System Info`,
singular: msg`System Info`,
});
Function UserSetup
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const UserSetup: CustomNextPage = () => {
const setupUserMutation = useSetupUserMutation();
const isChecking = useSetupCheck([
{
Function FormCodeEditor
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function FormCodeEditor(formInput: IFormCodeEditor) {
const {
input: { onFocus, name, onBlur, ...inputProps },
meta,
language,
Function IconInputField
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function IconInputField() {
return (
<Field name="icon" validateFields={[]} validate={required}>
{({ input, meta }) =>
SystemIconsList.includes(input.value as SystemIconsKeys) ? (
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 NavigationSkeleton
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function NavigationSkeleton() {
const SCHEMA = [
"header",
"item",
"item",
Function reducer
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
const reducer = (state: State, action: Action): State => {
switch (action.type) {
case "ADD_TOAST":
return {
...state,
- 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 Table
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
export function Table<T extends unknown>({
overridePaginatedDataState,
tableData,
syncPaginatedDataStateOut,
columns,
- 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 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"