Showing 750 of 983 total issues
Function renderer
has a Cognitive Complexity of 67 (exceeds 5 allowed). Consider refactoring. Open
export const renderer = ({
resource,
fields,
meta,
isCustomPage,
- 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 renderer
has a Cognitive Complexity of 67 (exceeds 5 allowed). Consider refactoring. Open
export const renderer = ({
resource,
fields,
meta,
isCustomPage,
- 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 renderer
has a Cognitive Complexity of 67 (exceeds 5 allowed). Consider refactoring. Open
export const renderer = ({
resource,
fields,
meta,
isCustomPage,
- 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 dataProvider
has a Cognitive Complexity of 65 (exceeds 5 allowed). Consider refactoring. Open
const dataProvider = (client: GraphQLClient): Required<DataProvider> => {
return {
getList: async ({ resource, pagination, sorters, filters, meta }) => {
const operation = camelcase(resource);
- 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 Monitor
has 250 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const Monitor = () => {
const { ws } = React.useContext(DevToolsContext);
const [activities, setActivities] = React.useState<Activity[]>([]);
const [searchParams] = useSearchParams();
Function createActionWithResource
has 234 lines of code (exceeds 25 allowed). Consider refactoring. Open
const createActionWithResource = async (resource: IResourceItem) => {
const {
name,
label: deprecatedLabel,
list,
Function Edit
has 230 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const Edit: React.FC<EditProps> = (props) => {
const {
children,
resource: resourceFromProps,
recordItemId,
Function ThemedSiderV2
has a Cognitive Complexity of 58 (exceeds 5 allowed). Consider refactoring. Open
export const ThemedSiderV2: React.FC<RefineThemedLayoutV2SiderProps> = ({
Title: TitleFromProps,
render,
meta,
activeItemDisabled = 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 Show
has 221 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const Show: React.FC<ShowProps> = (props) => {
const {
children,
resource: resourceFromProps,
recordItemId,
Function Show
has a Cognitive Complexity of 55 (exceeds 5 allowed). Consider refactoring. Open
export const Show: React.FC<ShowProps> = (props) => {
const {
children,
resource: resourceFromProps,
recordItemId,
- 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 Edit
has a Cognitive Complexity of 54 (exceeds 5 allowed). Consider refactoring. Open
export const Edit: React.FC<EditProps> = (props) => {
const {
children,
resource: resourceFromProps,
recordItemId,
- 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 ResourceComponent
has a Cognitive Complexity of 54 (exceeds 5 allowed). Consider refactoring. Open
const ResourceComponent: React.FC<{ route: string }> = ({ route }) => {
const { catchAll } = useRefineContext();
const { useParams } = useRouterContext();
const { resources } = useResource();
- 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 ThemedSider
has a Cognitive Complexity of 54 (exceeds 5 allowed). Consider refactoring. Open
export const ThemedSider: React.FC<RefineThemedLayoutSiderProps> = ({
Title: TitleFromProps,
render,
meta,
isSiderOpen,
- 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 dataProvider
has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring. Open
const dataProvider = (client: GraphQLClient): Required<DataProvider> => {
return {
getList: async ({ resource, pagination, sorters, filters, meta }) => {
const { current = 1, pageSize = 10, mode = "server" } = pagination ?? {};
- 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 resolver
has 206 lines of code (exceeds 25 allowed). Consider refactoring. Open
async (allFields: (InferField | false | null)[]) => {
console.groupCollapsed(
"@refinedev/inferencer is trying to detect relations",
);
const attempts: Array<ResourceInferenceAttempt> = [];
Function dataProvider
has 202 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const dataProvider = (
supabaseClient: SupabaseClient<any, any, any>,
): Required<DataProvider> => {
return {
getList: async ({ resource, pagination, filters, sorters, meta }) => {
Function useSelector
has 200 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const useSelector = (active: boolean) => {
const { devtoolsUrl } = React.useContext(DevToolsContext);
const [traceItems, setTraceItems] = React.useState<string[]>([]);
React.useEffect(() => {
Function useNotificationProvider
has a Cognitive Complexity of 51 (exceeds 5 allowed). Consider refactoring. Open
export const useNotificationProvider = (): NotificationProvider => {
const activeNotifications: string[] = [];
const isNotificationActive = (key?: string) => {
return activeNotifications.includes(key as string);
- 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 ThemedSiderV2
has a Cognitive Complexity of 51 (exceeds 5 allowed). Consider refactoring. Open
export const ThemedSiderV2: React.FC<RefineThemedLayoutV2SiderProps> = ({
Title: TitleFromProps,
render,
meta,
activeItemDisabled = 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 renderer
has a Cognitive Complexity of 50 (exceeds 5 allowed). Consider refactoring. Open
export const renderer = ({
resource,
fields,
meta,
isCustomPage,
- 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"