Showing 750 of 983 total issues
Function parse
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
parse: () => {
const { query, asPath: pathname, isReady } = useRouter();
const { resources } = useContext(ResourceContext);
const cleanPathname = pathname.split("?")[0].split("#")[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 CreateButton
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const CreateButton: React.FC<CreateButtonProps> = ({
resource: resourceNameFromProps,
resourceNameOrRouteName,
hideText = false,
accessControl,
- 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 CloneButton
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const CloneButton: React.FC<CloneButtonProps> = ({
resource: resourceNameFromProps,
resourceNameOrRouteName,
recordItemId,
hideText = 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 ListButton
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const ListButton: React.FC<ListButtonProps> = ({
resource: resourceNameFromProps,
resourceNameOrRouteName,
hideText = false,
accessControl,
- 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 Breadcrumb
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const Breadcrumb: React.FC<BreadcrumbProps> = ({
breadcrumbProps,
showHome = true,
hideIcons = false,
meta,
- 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 getFieldableKeys
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const getFieldableKeys = (
key: string,
data: Record<string, unknown>,
): string | string[] | undefined => {
const fieldableProperties = [
- 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 Breadcrumb
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const Breadcrumb: React.FC<BreadcrumbProps> = ({
breadcrumbProps,
showHome = true,
hideIcons = false,
meta,
- 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 resourceFromInferred
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const resourceFromInferred = (
field: InferField | false | null,
resources: IResourceItem[],
): IResourceItem | undefined => {
if (!field) {
- 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 ThemedHeader
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const ThemedHeader: React.FC<RefineThemedLayoutHeaderProps> = ({
isSiderOpen,
onToggleSiderClick,
toggleSiderIcon: toggleSiderIconFromProps,
}) => {
- 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 getOptionLabel
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const getOptionLabel = (field: InferField) => {
if (!field.relationInfer) return "";
if (field.relationInfer?.accessor) {
if (Array.isArray(field.relationInfer.accessor)) {
- 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 Header
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const Header = () => {
const [connectedApp, setConnectedApp] = React.useState<string | null>(null);
const { ws } = React.useContext(DevToolsContext);
const fetchConnectedApp = React.useCallback(async () => {
- 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 provideCliHelpers
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const provideCliHelpers = (
packagePath: string,
isAbsolute?: boolean,
) => {
Module.prototype.require = function (...args: Parameters<NodeRequire>) {
- 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 createResources
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const createResources = async (
params: { actions?: string; path?: string },
resources: string[],
) => {
const destinationPath =
- 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 getValueProps
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const getValueProps = (data: any, imageUrl: string) => {
if (!data) {
return { fileList: [] };
}
- 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 setup
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
setup: (build) => {
if (build.initialOptions.format === "cjs") {
build.onEnd(async (args) => {
const tablerRequire = 'require("@tabler/icons-react")';
const cjsTablerRequire =
- 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 ReactKeycloakProvider
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const ReactKeycloakProvider = ({ children }: { children: React.ReactNode }) => {
const externalNavigator = React.useContext(ExternalNavigationContext);
const [isAuthenticated, setIsAuthenticated] = React.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 setup
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
setup: (build) => {
if (build.initialOptions.format === "esm") {
build.onEnd(async (args) => {
const dayJsImportRegexp = /from\s?"dayjs\/plugin\/(\w*?)"/g;
const dayJsEsmImport = 'from "dayjs/plugin/$1.js"';
- 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 setup
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
setup: (build) => {
if (build.initialOptions.format === "esm") {
build.onEnd(async (args) => {
const muiIconsMaterialImportRegexp =
/from\s?"@mui\/icons-material\/(\w*?)"/g;
- 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 getValueProps
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const getValueProps = (data: any, imageUrl: string) => {
if (!data) {
return { fileList: [] };
}
- 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 RefreshButton
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const RefreshButton: React.FC<RefreshButtonProps> = ({
resource: resourceNameFromProps,
resourceNameOrRouteName,
recordItemId,
hideText = 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"