Showing 580 of 800 total issues
Function asyncDebounce
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const asyncDebounce = <T extends (...args: any[]) => any>(
func: T,
wait = 1000,
cancelReason?: string,
): DebouncedFunction<T> => {
Function createTreeView
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const createTreeView = (
resources: IResourceItem[] | IMenuItem[],
): ITreeMenu[] | ITreeMenu[] => {
const tree = [];
const resourcesRouteObject: { [key: string]: any } = {};
Function Header
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const Header: React.FC<RefineLayoutHeaderProps> = () => {
const authProvider = useActiveAuthProvider();
const { data: user } = useGetIdentity({
v3LegacyAuthProviderCompatible: Boolean(authProvider?.isLegacy),
});
Function promptInteractiveRefineUpdate
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const promptInteractiveRefineUpdate = async (
packages: RefinePackageInstalledVersionData[],
) => {
const uiGroup = createUIGroup(packages);
if (!uiGroup) {
Function flattenObjectKeys
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const flattenObjectKeys = (obj: any, prefix = "") => {
if (!isNested(obj)) {
return {
[prefix]: obj,
};
Function generateFilters
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const generateFilters = (filters: LogicalFilter[]) => {
const result: { [key: string]: { [key: string]: string | number } } = {};
filters
.filter((f) => {
Function checkGitStatus
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function checkGitStatus(force) {
let clean = false;
let errorMessage = "Unable to determine if git directory is clean";
try {
clean = isGitClean.sync(process.cwd());
Function updateActionButtonsPropstoHeaderButtons
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const updateActionButtonsPropstoHeaderButtons = (
j: JSCodeshift,
root: Collection<any>,
) => {
const components = ["Show", "Edit", "List", "Create"];
Function updateSetEditIdToSetId
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const updateSetEditIdToSetId = (j: JSCodeshift, root: Collection<any>) => {
const updatedFormHooks = [
"useEditableTable",
"useModalForm",
"useDrawerForm",
Function getInstalledPackageJSONPath
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const getInstalledPackageJSONPath = async (packageName: string) => {
try {
const filesFromGlobbySearch = await globby(
`node_modules/${packageName}/package.json`,
{
Function addAntDesignImports
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const addAntDesignImports = (j: JSCodeshift, source: Collection) => {
addOrUpdateImports(
j,
source,
"@refinedev/antd",
Function getPanelPosition
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const getPanelPosition = (placement: Placement) => {
switch (placement) {
case "left":
return {
left: `calc(${SIZE}px + ${BUFFER}px)`,
Function listener
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const listener = (payload: RealtimePostgresChangesPayload<any>) => {
if (
types.includes("*") ||
types.includes(liveTypes[payload.eventType])
) {
Function mostCommonFields
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const mostCommonFields = allUniqueKeys.map((key) => {
const fields = inferred.map((fields) =>
fields.find((field) => field.key === key),
);
Function HamburgerMenu
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const HamburgerMenu: React.FC = () => {
const {
siderCollapsed,
setSiderCollapsed,
mobileSiderOpen,
Consider simplifying this complex logical expression. Open
Open
if (
field.type === "text" ||
field.type === "url" ||
field.type === "email" ||
field.type === "number" ||
Consider simplifying this complex logical expression. Open
Open
if (
field.type === "text" ||
field.type === "url" ||
field.type === "email" ||
field.type === "number" ||
Consider simplifying this complex logical expression. Open
Open
if (
field.type === "text" ||
field.type === "url" ||
field.type === "email" ||
field.type === "number" ||
Consider simplifying this complex logical expression. Open
Open
if (
field.type === "text" ||
field.type === "url" ||
field.type === "email" ||
field.type === "number" ||
Consider simplifying this complex logical expression. Open
Open
if (
field.type === "text" ||
field.type === "url" ||
field.type === "email" ||
field.type === "number" ||