Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,13 +172,17 @@ module.exports = {
'no-restricted-syntax': [
'warn',
{
selector: 'ImportDeclaration[source.value="lodash"] > ImportSpecifier',
message: 'Use default import from "lodash/{method}" instead of named import from "lodash". Example: import set from "lodash/set"',
selector: 'ImportDeclaration[source.value="lodash"]',
message: 'Use specific lodash imports instead. Example: import get from "lodash/get"',
},
{
selector: 'VariableDeclarator[id.type="ObjectPattern"][init.type="CallExpression"][init.callee.name="require"][init.arguments.0.value="lodash"]',
message: 'Use require("lodash/{method}") instead of destructuring from require("lodash"). Example: const get = require("lodash/get")',
},
{
selector: 'VariableDeclarator[init.type="CallExpression"][init.callee.name="require"][init.arguments.0.value="lodash"]',
message: 'Use specific lodash imports instead. Example: const get = require("lodash/get")',
},
],
'import/order': [
'error',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { PaymentStatusType, SortPaymentsBy } from '@app/condo/schema'
import { Col, Row, Space } from 'antd'
import { Gutter } from 'antd/lib/grid/row'
import dayjs, { Dayjs } from 'dayjs'
import { get } from 'lodash'
import get from 'lodash/get'
import getConfig from 'next/config'
import { useRouter } from 'next/router'
import React, { useCallback, useState } from 'react'
Expand Down
2 changes: 1 addition & 1 deletion apps/condo/domains/acquiring/utils/clientSchema/search.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { BillingIntegrationOrganizationContext } from '@app/condo/schema'
import { gql } from 'graphql-tag'
import { isEmpty } from 'lodash'
import isEmpty from 'lodash/isEmpty'

const GET_ALL_BILLING_PROPERTIES_BY_VALUE_QUERY = gql`
query selectBillingProperty ($where: BillingPropertyWhereInput, $orderBy: String, $first: Int, $skip: Int) {
Expand Down
2 changes: 1 addition & 1 deletion apps/condo/domains/analytics/utils/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import {
import dayjs, { Dayjs } from 'dayjs'
import duration from 'dayjs/plugin/duration'
import relativeTime from 'dayjs/plugin/relativeTime'
import { isEmpty } from 'lodash'
import get from 'lodash/get'
import groupBy from 'lodash/groupBy'
import isEmpty from 'lodash/isEmpty'

import { fontSizes } from '@condo/domains/common/constants/style'
import { TICKET_REPORT_DAY_GROUP_STEPS } from '@condo/domains/ticket/constants/common'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import styled from '@emotion/styled'
import { isEmpty } from 'lodash'
import debounce from 'lodash/debounce'
import get from 'lodash/get'
import isEmpty from 'lodash/isEmpty'
import isFunction from 'lodash/isFunction'
import throttle from 'lodash/throttle'
import uniqBy from 'lodash/uniqBy'
Expand Down
2 changes: 1 addition & 1 deletion apps/condo/domains/common/components/Comments/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { Ticket, TicketComment, TicketCommentFile } from '@app/condo/schema'
import { Form, FormInstance, notification } from 'antd'
import classNames from 'classnames'
import dayjs from 'dayjs'
import { pickBy } from 'lodash'
import pickBy from 'lodash/pickBy'
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'

import { getClientSideSenderInfo } from '@open-condo/miniapp-utils'
Expand Down
2 changes: 1 addition & 1 deletion apps/condo/domains/common/components/TextHighlighter.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Typography } from 'antd'
import { BaseType } from 'antd/lib/typography/Base'
import { isNull } from 'lodash'
import isEmpty from 'lodash/isEmpty'
import isNull from 'lodash/isNull'
import React from 'react'

import { getEscaped } from '@condo/domains/common/utils/string.utils'
Expand Down
3 changes: 2 additions & 1 deletion apps/condo/domains/common/components/containers/FormList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ import {
} from 'antd'
import { FormProps } from 'antd/lib/form/Form'
import { ArgsProps } from 'antd/lib/notification'
import { isUndefined, throttle } from 'lodash'
import isFunction from 'lodash/isFunction'
import isUndefined from 'lodash/isUndefined'
import omitBy from 'lodash/omitBy'
import throttle from 'lodash/throttle'
import React, { useCallback, useState, useRef, CSSProperties, ComponentProps } from 'react'
import { Options } from 'scroll-into-view-if-needed'

Expand Down
4 changes: 3 additions & 1 deletion apps/condo/domains/common/hooks/useDateRangeSearch.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import dayjs from 'dayjs'
import { get, debounce, isArray } from 'lodash'
import debounce from 'lodash/debounce'
import get from 'lodash/get'
import isArray from 'lodash/isArray'
import { useRouter } from 'next/router'
import { useCallback } from 'react'

Expand Down
2 changes: 1 addition & 1 deletion apps/condo/domains/common/hooks/useExportToExcel.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { notification } from 'antd'
import { DocumentNode } from 'graphql'
import { get } from 'lodash'
import get from 'lodash/get'
import React, { useCallback } from 'react'

import { getClientSideSenderInfo } from '@open-condo/miniapp-utils/helpers/sender'
Expand Down
2 changes: 1 addition & 1 deletion apps/condo/domains/common/hooks/useGlobalHints.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { Col, Row, RowProps } from 'antd'
import { isObject } from 'lodash'
import get from 'lodash/get'
import has from 'lodash/has'
import isArray from 'lodash/isArray'
import isBoolean from 'lodash/isBoolean'
import isEmpty from 'lodash/isEmpty'
import isObject from 'lodash/isObject'
import isString from 'lodash/isString'
import getConfig from 'next/config'
import Link from 'next/link'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ import { BuildingUnitSubType, Contact as ContactType } from '@app/condo/schema'
import styled from '@emotion/styled'
import { Col, Form, FormInstance, FormItemProps, Row, Tabs } from 'antd'
import { Gutter } from 'antd/lib/grid/row'
import { isNil } from 'lodash'
import debounce from 'lodash/debounce'
import find from 'lodash/find'
import get from 'lodash/get'
import isEmpty from 'lodash/isEmpty'
import isFunction from 'lodash/isFunction'
import isNil from 'lodash/isNil'
import pickBy from 'lodash/pickBy'
import React, { CSSProperties, useCallback, useEffect, useMemo, useState } from 'react'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Col, Form, Input, Row } from 'antd'
import { Gutter } from 'antd/es/grid/row'
import { get } from 'lodash'
import get from 'lodash/get'
import { useRouter } from 'next/router'
import React, { useCallback } from 'react'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { get } from 'lodash'
import get from 'lodash/get'
import React, { useMemo } from 'react'

import { useIntl } from '@open-condo/next/intl'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { get } from 'lodash'
import get from 'lodash/get'
import React, { useMemo } from 'react'

import { useIntl } from '@open-condo/next/intl'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Invoice } from '@app/condo/schema'
import { get } from 'lodash'
import get from 'lodash/get'
import { useRouter } from 'next/router'
import React, { useCallback } from 'react'

Expand Down
5 changes: 4 additions & 1 deletion apps/condo/domains/marketplace/utils/clientSchema/Invoice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,12 @@ import {
InvoiceUpdateInput,
QueryAllInvoicesArgs,
} from '@app/condo/schema'
import { get, isNull, isUndefined, pickBy } from 'lodash'
import get from 'lodash/get'
import isEmpty from 'lodash/isEmpty'
import isNull from 'lodash/isNull'
import isUndefined from 'lodash/isUndefined'
import omit from 'lodash/omit'
import pickBy from 'lodash/pickBy'

import { generateReactHooks } from '@open-condo/codegen/generate.hooks'

Expand Down
3 changes: 2 additions & 1 deletion apps/condo/domains/meter/components/Import/Index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { File } from '@app/condo/schema'
import { isNil, isFunction } from 'lodash'
import isFunction from 'lodash/isFunction'
import isNil from 'lodash/isNil'
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'

import { useAuth } from '@open-condo/next/auth'
Expand Down
2 changes: 1 addition & 1 deletion apps/condo/domains/meter/utils/helpers.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { FormInstance } from 'antd'
import dayjs from 'dayjs'
import { isUndefined } from 'lodash'
import isEmpty from 'lodash/isEmpty'
import isNumber from 'lodash/isNumber'
import isString from 'lodash/isString'
import isUndefined from 'lodash/isUndefined'
import { NextRouter } from 'next/router'
import React from 'react'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { Col, Form, Row, Typography } from 'antd'
import { difference, find, get } from 'lodash'
import difference from 'lodash/difference'
import find from 'lodash/find'
import get from 'lodash/get'
import getConfig from 'next/config'
import { useRouter } from 'next/router'
import React, { useCallback, useEffect, useMemo } from 'react'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ import {
OrganizationEmployeeUpdateInput,
QueryAllOrganizationEmployeesArgs,
} from '@app/condo/schema'
import { get, omit } from 'lodash'
import get from 'lodash/get'
import omit from 'lodash/omit'

import { generateReactHooks } from '@open-condo/codegen/generate.hooks'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Typography } from 'antd'
import { isEmpty } from 'lodash'
import isEmpty from 'lodash/isEmpty'
import React from 'react'

import { useIntl } from '@open-condo/next/intl'
Expand Down
2 changes: 1 addition & 1 deletion apps/condo/domains/property/components/UnitInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { GetPropertyByIdQueryHookResult } from '@app/condo/gql'
import { BuildingFloor, BuildingSection, BuildingUnitSubType, MeterUnitTypeType } from '@app/condo/schema'
import { Col, Form, FormInstance, Row } from 'antd'
import { Gutter } from 'antd/es/grid/row'
import { isEmpty } from 'lodash'
import get from 'lodash/get'
import isEmpty from 'lodash/isEmpty'
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'

import { useDeepCompareEffect } from '@open-condo/codegen/utils/useDeepCompareEffect'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { BuildingMap, BuildingSectionType, BuildingUnitSubType } from '@app/condo/schema'
import { cloneDeep } from 'lodash'
import cloneDeep from 'lodash/cloneDeep'

import {
autoFixBuildingMapJson,
Expand Down
2 changes: 1 addition & 1 deletion apps/condo/domains/property/utils/clientSchema/Property.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
BuildingMap,
} from '@app/condo/schema'
import dayjs from 'dayjs'
import { get } from 'lodash'
import get from 'lodash/get'

import { generateReactHooks } from '@open-condo/codegen/generate.hooks'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ import {
} from '@app/condo/schema'
import { Col, Form, Input, Row } from 'antd'
import { Gutter } from 'antd/es/grid/row'
import { difference, isEmpty } from 'lodash'
import difference from 'lodash/difference'
import get from 'lodash/get'
import isEmpty from 'lodash/isEmpty'
import { useRouter } from 'next/router'
import React, { useCallback, useMemo, useState } from 'react'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { get } from 'lodash'
import get from 'lodash/get'
import React, { useMemo } from 'react'

import { useIntl } from '@open-condo/next/intl'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { get } from 'lodash'
import get from 'lodash/get'
import React, { useCallback, useMemo } from 'react'

import { useIntl } from '@open-condo/next/intl'
Expand Down
2 changes: 1 addition & 1 deletion apps/condo/domains/scope/utils/clientSchema/search.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Property } from '@app/condo/schema'
import { gql } from 'graphql-tag'
import { isEmpty } from 'lodash'
import isEmpty from 'lodash/isEmpty'

async function _search (client, query, variables) {
return await client.query({
Expand Down
4 changes: 3 additions & 1 deletion apps/condo/domains/scope/utils/clientSchema/utils.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import { differenceBy, get, isEmpty } from 'lodash'
import differenceBy from 'lodash/differenceBy'
import get from 'lodash/get'
import isEmpty from 'lodash/isEmpty'
import React from 'react'

import { renderBlockedOption } from '@condo/domains/common/components/GraphQlSearchInput'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
TicketWhereInput,
} from '@app/condo/schema'
import { Col, ColProps, Form, Row, RowProps } from 'antd'
import { isNil } from 'lodash'
import isNil from 'lodash/isNil'
import { useRouter } from 'next/router'
import qs from 'qs'
import React, { useCallback, useMemo, useState } from 'react'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@ import { useGetTicketsWithSamePropertyAndClassifierExistenceQuery, usePredictTic
import { TicketStatusTypeType } from '@app/condo/schema'
import { Col, Form, FormInstance, Row } from 'antd'
import { Gutter } from 'antd/es/grid/row'
import { uniqBy, isEmpty, find, pick } from 'lodash'
import find from 'lodash/find'
import isEmpty from 'lodash/isEmpty'
import isFunction from 'lodash/isFunction'
import pick from 'lodash/pick'
import uniqBy from 'lodash/uniqBy'
import React, { useEffect, useState, useRef, useMemo, useCallback } from 'react'

import { useCachePersistor } from '@open-condo/apollo'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Ticket } from '@app/condo/schema'
import { Typography } from 'antd'
import { get } from 'lodash'
import get from 'lodash/get'
import React, { useMemo } from 'react'

import { useIntl } from '@open-condo/next/intl'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useGetTicketFilesQuery } from '@app/condo/gql'
import { Ticket } from '@app/condo/schema'
import { isEmpty } from 'lodash'
import isEmpty from 'lodash/isEmpty'
import React, { useMemo } from 'react'

import { useCachePersistor } from '@open-condo/apollo'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { Editor } from '@tinymce/tinymce-react'
import { Alert, Col, Form, Row, Typography } from 'antd'
import { Gutter } from 'antd/es/grid/row'
import { get, isEmpty } from 'lodash'
import get from 'lodash/get'
import isEmpty from 'lodash/isEmpty'
import getConfig from 'next/config'
import { useRouter } from 'next/router'
import qs from 'qs'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { get } from 'lodash'
import get from 'lodash/get'
import React, { useMemo } from 'react'

import { useIntl } from '@open-condo/next/intl'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { SortTicketPropertyHintsBy } from '@app/condo/schema'
import styled from '@emotion/styled'
import { Col, Row, Typography } from 'antd'
import { Gutter } from 'antd/es/grid/row'
import { isEmpty } from 'lodash'
import get from 'lodash/get'
import isEmpty from 'lodash/isEmpty'
import { useRouter } from 'next/router'
import React, { useCallback, useMemo } from 'react'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useGetTicketPropertyHintByIdQuery, useGetTicketPropertyHintPropertyByPropertyQuery } from '@app/condo/gql'
import styled from '@emotion/styled'
import { Col, ColProps, Typography } from 'antd'
import { get } from 'lodash'
import get from 'lodash/get'
import React, { CSSProperties, useMemo } from 'react'

import { useCachePersistor } from '@open-condo/apollo'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { get } from 'lodash'
import get from 'lodash/get'
import React, { useCallback, useMemo } from 'react'

import { useIntl } from '@open-condo/next/intl'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import {
import { TableColumnType } from 'antd'
import { FilterValue } from 'antd/es/table/interface'
import dayjs from 'dayjs'
import { isEmpty } from 'lodash'
import get from 'lodash/get'
import isEmpty from 'lodash/isEmpty'
import uniqBy from 'lodash/uniqBy'
import React from 'react'
import { IntlShape } from 'react-intl/src/types'
Expand Down
4 changes: 3 additions & 1 deletion apps/condo/domains/ticket/utils/clientSchema/Ticket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ import {
TicketStatusTypeType,
} from '@app/condo/schema'
import dayjs, { Dayjs } from 'dayjs'
import { get, isUndefined, isNull } from 'lodash'
import get from 'lodash/get'
import isNull from 'lodash/isNull'
import isUndefined from 'lodash/isUndefined'

import { generateReactHooks } from '@open-condo/codegen/generate.hooks'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
import { Col, Row } from 'antd'
import { Gutter } from 'antd/es/grid/row'
import { gql } from 'graphql-tag'
import { get } from 'lodash'
import get from 'lodash/get'
import { NextRouter } from 'next/router'
import qs from 'qs'
import { useCallback } from 'react'
Expand Down
2 changes: 1 addition & 1 deletion apps/condo/domains/user/components/SectionNameInput.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { sortBy } from 'lodash'
import get from 'lodash/get'
import isEmpty from 'lodash/isEmpty'
import sortBy from 'lodash/sortBy'
import React from 'react'

import { useIntl } from '@open-condo/next/intl'
Expand Down
Loading
Loading