Showing 580 of 800 total issues
Function emailFields
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const emailFields = (field: InferField) => {
if (field.type === "email") {
imports.push(
["TagField", "@refinedev/chakra-ui"],
["EmailField", "@refinedev/chakra-ui"],
Function emailFields
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const emailFields = (field: InferField) => {
if (field.type === "email") {
imports.push(["EmailField", "@refinedev/mantine"]);
if (field.multiple) {
Function booleanFields
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const booleanFields = (field: InferField) => {
if (field.type === "boolean") {
imports.push(
["TagField", "@refinedev/chakra-ui"],
["BooleanField", "@refinedev/chakra-ui"],
Function relationHooksCode
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
.map((field) => {
if (field?.relation && !field.fieldable && field.resource) {
imports.push(["useMany", "@refinedev/core"]);
let idsString = "";
Function numberFields
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const numberFields = (field: InferField) => {
if (field.type === "number") {
imports.push(["NumberField", "@refinedev/mantine"]);
if (field.multiple) {
Function urlFields
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const urlFields = (field: InferField) => {
if (field.type === "url") {
imports.push(
["TagField", "@refinedev/chakra-ui"],
["UrlField", "@refinedev/chakra-ui"],
Function relationHooksCode
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
.map((field) => {
if (field?.relation && !field.fieldable && field.resource) {
imports.push(["useSelect", "@refinedev/mantine"]);
let val = accessor(recordName, field.key, field.accessor, false);
Function numberFields
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const numberFields = (field: InferField) => {
if (field.type === "number") {
imports.push(["NumberInput", "@mantine/core"]);
initialValues = {
Function numberFields
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const numberFields = (field: InferField) => {
if (field.type === "number") {
imports.push(
["NumberField", "@refinedev/chakra-ui"],
["TagField", "@refinedev/chakra-ui"],
Function inferMultipleRecords
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const inferMultipleRecords = (records: Record<string, unknown>[]) => {
// infer each record
// get the most common one for each field
// also get the first occurence of the each most common field/key and construct a fresh record from them.
// return the fresh record and the inferred fields
Function textFields
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const textFields = (field: InferField) => {
if (field.type === "text") {
imports.push(["TextFieldComponent as TextField", "@refinedev/mui"]);
if (field.multiple) {
Function dateFields
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const dateFields = (field: InferField) => {
if (field.type === "date") {
imports.push(["DateField", "@refinedev/mui"]);
if (field.multiple) {
Function printUpdateWarningTable
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const printUpdateWarningTable = async (
params: UpdateWarningTableParams,
) => {
const data = params?.data;
const tableHead = Object.keys(data?.[0] || {});
Function createUIGroup
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const createUIGroup = (
packages: RefinePackageInstalledVersionData[],
): UIGroup | null => {
if (packages.length === 0) {
return null;
Function transformMuiOperatorToCrudOperator
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const transformMuiOperatorToCrudOperator = (
operatorValue?: string,
): Exclude<CrudOperators, "or" | "and"> => {
if (!operatorValue) {
return "eq";
Function listUrl
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const listUrl = (
resource: string | IResourceItem,
meta: MetaDataQuery = {},
) => {
if (routerType === "legacy") {
Function createUrl
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const createUrl = (
resource: string | IResourceItem,
meta: MetaDataQuery = {},
) => {
if (routerType === "legacy") {
Function metaDataToMeta
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const metaDataToMeta = (j: JSCodeshift, source: Collection) => {
// find all JSX elements
source.find(j.JSXElement).forEach((path) => {
const attributes = path.node.openingElement.attributes;
if (!attributes) return;
Function renameUseSimpleListQueryResult
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const renameUseSimpleListQueryResult = (
j: JSCodeshift,
source: Collection,
) => {
const renameProperties = (prop) => {
Function emailFields
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const emailFields = (field: InferField) => {
if (field.type === "email") {
imports.push(
["TagField", "@refinedev/antd"],
["EmailField", "@refinedev/antd"],