Showing 756 of 987 total issues
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 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 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 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 booleanFields
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const booleanFields = (field: InferField) => {
if (field.type === "boolean") {
imports.push(["BooleanField", "@refinedev/mantine"]);
if (field.multiple) {
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 createUrl
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const createUrl = (
resource: string | IResourceItem,
meta: MetaDataQuery = {},
) => {
if (routerType === "legacy") {
Function transformMuiOperatorToCrudOperator
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const transformMuiOperatorToCrudOperator = (
operatorValue?: string,
): Exclude<CrudOperators, "or"> => {
if (!operatorValue) {
return "eq";
Function cancelNotification
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const cancelNotification = () => {
if (notification.isRunning === true) {
if (notification.seconds === 0) {
notification.doMutation();
}
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 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 setupServer
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const setupServer = (app: Express) => {
const server = app
.listen(SERVER_PORT, () => {
if (__DEVELOPMENT__) {
console.log(`Server started on PORT ${SERVER_PORT}`);
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"],
Function renderTreeView
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const renderTreeView = (tree: ITreeMenu[], selectedKey?: string) => {
return tree.map((item) => {
const { icon, label, route, name, children } = item;
const isSelected = item.key === selectedKey;
Function textFields
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const textFields = (field: InferField) => {
if (field.type === "text") {
imports.push(["TextField", "@refinedev/mantine"]);
if (field.multiple) {
Function imageFields
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const imageFields = (field: InferField) => {
if (field.type === "image") {
if (field.multiple) {
const val = accessor("item", undefined, field.accessor);
Function textFields
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const textFields = (field: InferField) => {
if (field.type === "text") {
imports.push(
["TagField", "@refinedev/chakra-ui"],
["TextField", "@refinedev/chakra-ui"],
Function renderProviders
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const renderProviders = () => {
if (providers && providers.length > 0) {
return (
<>
<Stack spacing={1}>
Function resourceNametoResource
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const resourceNametoResource = (j: JSCodeshift, source: Collection) => {
const willCheckHooks = ["useExport", "useImport"];
willCheckHooks.forEach((hookName) => {
const useListHooks = source.find(j.CallExpression, {
Function sorterToSorters
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const sorterToSorters = (j: JSCodeshift, source: Collection) => {
const willCheckHooks = ["useExport"];
willCheckHooks.forEach((hookName) => {
const useListHooks = source.find(j.CallExpression, {