Showing 750 of 983 total issues
Function objectInfer
has a Cognitive Complexity of 49 (exceeds 5 allowed). Consider refactoring. Open
export const objectInfer: FieldInferencer = (
key,
value,
record,
infer,
- 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 useLogin
has a Cognitive Complexity of 49 (exceeds 5 allowed). Consider refactoring. Open
export function useLogin<TVariables = {}>({
v3LegacyAuthProviderCompatible,
mutationOptions,
}: UseLoginProps<TVariables> | UseLoginLegacyProps<TVariables> = {}):
| UseLoginLegacyReturnType<TVariables>
- 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 48 (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 useForm
has 184 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const useForm = <
TQueryFnData extends BaseRecord = BaseRecord,
TError extends HttpError = HttpError,
TVariables = {},
TData extends BaseRecord = TQueryFnData,
Function Edit
has 183 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 46 (exceeds 5 allowed). Consider refactoring. Open
export const ThemedSiderV2: React.FC<RefineThemedLayoutV2SiderProps> = ({
render,
meta,
Title: TitleFromProps,
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 ThemedSider
has a Cognitive Complexity of 46 (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 Sider
has a Cognitive Complexity of 46 (exceeds 5 allowed). Consider refactoring. Open
export const Sider: React.FC<RefineLayoutSiderProps> = ({
Title: TitleFromProps,
render,
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 useForm
has a Cognitive Complexity of 46 (exceeds 5 allowed). Consider refactoring. Open
export const useForm = <
TQueryFnData extends BaseRecord = BaseRecord,
TError extends HttpError = HttpError,
TVariables = {},
TData extends BaseRecord = TQueryFnData,
- 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 action
has 177 lines of code (exceeds 25 allowed). Consider refactoring. Open
const action = async (_options: OptionValues) => {
inquirer.registerPrompt("autocomplete", inquirerAutoCompletePrompt);
const installedPackages = await getInstalledRefinePackagesFromNodeModules();
Function promises
has 175 lines of code (exceeds 25 allowed). Consider refactoring. Open
const promises = allFields.map(async (field) => {
if (field && (field.relation || field.canRelation)) {
if (record) {
if (field.relationInfer) {
return field;
Function fixDeprecatedReactTableProps
has 174 lines of code (exceeds 25 allowed). Consider refactoring. Open
const fixDeprecatedReactTableProps = (j: JSCodeshift, source: Collection) => {
const refineReactTableImports = source.find(j.ImportDeclaration, {
source: {
value: "@pankod/refine-react-table",
},
Function Show
has a Cognitive Complexity of 45 (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 Show
has 172 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const Show: React.FC<ShowProps> = (props) => {
const {
children,
resource: resourceFromProps,
recordItemId,
Function Packages
has 169 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const Packages = () => {
const ref = React.useRef<FireworksHandlers>(null);
const [packages, setPackages] = React.useState<PackageType[]>([]);
const [visible, setVisible] = React.useState(false);
const [outdatedPackages, setOutdatedPackages] = React.useState<string[]>([]);
Function ThemedSider
has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring. Open
export const ThemedSider: React.FC<RefineThemedLayoutSiderProps> = ({
render,
meta,
Title: TitleFromProps,
}) => {
- 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 createInferencer
has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring. Open
export const createInferencer: CreateInferencer = ({
type,
additionalScope = [],
customElements = [],
fieldTransformers = [],
- 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 a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring. Open
export const Show: React.FC<ShowProps> = ({
title,
canEdit,
canDelete,
isLoading = 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 run
has 165 lines of code (exceeds 25 allowed). Consider refactoring. Open
const run = async (
example: string | boolean | undefined,
destination?: string,
) => {
const pm = findPM();
Function Edit
has a Cognitive Complexity of 43 (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"