Skip to content

Commit

Permalink
ESLint no-default-exports 10 - all desktop-client src folders except …
Browse files Browse the repository at this point in the history
…icons
  • Loading branch information
joel-jeremy committed Jan 4, 2024
1 parent 85aa421 commit 6f0b02f
Show file tree
Hide file tree
Showing 72 changed files with 92 additions and 93 deletions.
8 changes: 4 additions & 4 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -246,11 +246,11 @@ module.exports = {
'./packages/crdt/**/*',
'./packages/desktop-client/src/*',
'./packages/desktop-client/src/components/**/*',
// './packages/desktop-client/src/hooks/**/*',
'./packages/desktop-client/src/hooks/**/*',
// './packages/desktop-client/src/icons/**/*',
// './packages/desktop-client/src/style/**/*',
// './packages/desktop-client/src/types/**/*',
// './packages/desktop-client/src/util/**/*',
'./packages/desktop-client/src/style/**/*',
'./packages/desktop-client/src/types/**/*',
'./packages/desktop-client/src/util/**/*',
// './packages/desktop-electron/**/*',
// './packages/eslint-plugin-actual/**/*',
// './packages/loot-core/*',
Expand Down
2 changes: 1 addition & 1 deletion packages/desktop-client/src/components/FixedSizeList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {

import memoizeOne from 'memoize-one';

import useResizeObserver from '../hooks/useResizeObserver';
import { useResizeObserver } from '../hooks/useResizeObserver';
import { type CSSProperties } from '../style';

import { View } from './common/View';
Expand Down
2 changes: 1 addition & 1 deletion packages/desktop-client/src/components/GlobalKeys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { useEffect } from 'react';

import * as Platform from 'loot-core/src/client/platform';

import useNavigate from '../hooks/useNavigate';
import { useNavigate } from '../hooks/useNavigate';

export function GlobalKeys() {
const navigate = useNavigate();
Expand Down
4 changes: 2 additions & 2 deletions packages/desktop-client/src/components/ManageRules.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import { mapField, friendlyOp } from 'loot-core/src/shared/rules';
import { describeSchedule } from 'loot-core/src/shared/schedules';
import { type RuleEntity } from 'loot-core/src/types/models';

import useCategories from '../hooks/useCategories';
import useSelected, { SelectedProvider } from '../hooks/useSelected';
import { useCategories } from '../hooks/useCategories';
import { useSelected, SelectedProvider } from '../hooks/useSelected';
import { theme } from '../style';

import { Button } from './common/Button';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';

import useNavigate from '../hooks/useNavigate';
import { useNavigate } from '../hooks/useNavigate';
import CheveronLeft from '../icons/v1/CheveronLeft';
import { type CSSProperties, styles, theme } from '../style';

Expand Down
4 changes: 2 additions & 2 deletions packages/desktop-client/src/components/Modals.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { useLocation } from 'react-router-dom';
import { send } from 'loot-core/src/platform/client/fetch';

import { useActions } from '../hooks/useActions';
import useCategories from '../hooks/useCategories';
import useSyncServerStatus from '../hooks/useSyncServerStatus';
import { useCategories } from '../hooks/useCategories';
import { useSyncServerStatus } from '../hooks/useSyncServerStatus';
import { type CommonModalProps } from '../types/modals';

import { CategoryGroupMenu } from './modals/CategoryGroupMenu';
Expand Down
4 changes: 2 additions & 2 deletions packages/desktop-client/src/components/Titlebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import { listen } from 'loot-core/src/platform/client/fetch';
import { type LocalPrefs } from 'loot-core/src/types/prefs';

import { useActions } from '../hooks/useActions';
import useFeatureFlag from '../hooks/useFeatureFlag';
import useNavigate from '../hooks/useNavigate';
import { useFeatureFlag } from '../hooks/useFeatureFlag';
import { useNavigate } from '../hooks/useNavigate';
import ArrowLeft from '../icons/v1/ArrowLeft';
import AlertTriangle from '../icons/v2/AlertTriangle';
import NavigationMenu from '../icons/v2/NavigationMenu';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import {
import { applyChanges, groupById } from 'loot-core/src/shared/util';

import { authorizeBank } from '../../gocardless';
import useCategories from '../../hooks/useCategories';
import { useCategories } from '../../hooks/useCategories';
import { SelectedProviderWithItems } from '../../hooks/useSelected';
import { styles, theme } from '../../style';
import { Button } from '../common/Button';
Expand Down
2 changes: 1 addition & 1 deletion packages/desktop-client/src/components/accounts/Header.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useState, useRef } from 'react';

import useSyncServerStatus from '../../hooks/useSyncServerStatus';
import { useSyncServerStatus } from '../../hooks/useSyncServerStatus';
import AnimatedLoading from '../../icons/AnimatedLoading';
import Add from '../../icons/v1/Add';
import ArrowsExpand3 from '../../icons/v2/ArrowsExpand3';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ import {
ungroupTransactions,
} from 'loot-core/src/shared/transactions';

import useCategories from '../../hooks/useCategories';
import useNavigate from '../../hooks/useNavigate';
import { useCategories } from '../../hooks/useCategories';
import { useNavigate } from '../../hooks/useNavigate';
import { useSetThemeColor } from '../../hooks/useSetThemeColor';
import { theme } from '../../style';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { useSelector } from 'react-redux';
import * as queries from 'loot-core/src/client/queries';

import { useActions } from '../../hooks/useActions';
import useCategories from '../../hooks/useCategories';
import useNavigate from '../../hooks/useNavigate';
import { useCategories } from '../../hooks/useCategories';
import { useNavigate } from '../../hooks/useNavigate';
import { useSetThemeColor } from '../../hooks/useSetThemeColor';
import Add from '../../icons/v1/Add';
import { theme, styles } from '../../style';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { type ComponentProps } from 'react';

import useFeatureFlag from '../../hooks/useFeatureFlag';
import { useFeatureFlag } from '../../hooks/useFeatureFlag';
import ArrowThinRight from '../../icons/v1/ArrowThinRight';
import { type CSSProperties } from '../../style';
import { View } from '../common/View';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { css } from 'glamor';

import { addMonths, subMonths } from 'loot-core/src/shared/months';

import useResizeObserver from '../../hooks/useResizeObserver';
import { useResizeObserver } from '../../hooks/useResizeObserver';
import { View } from '../common/View';

import { MonthsContext } from './MonthsContext';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { send, listen } from 'loot-core/src/platform/client/fetch';
import * as monthUtils from 'loot-core/src/shared/months';

import { useActions } from '../../hooks/useActions';
import useCategories from '../../hooks/useCategories';
import { useCategories } from '../../hooks/useCategories';
import { useSetThemeColor } from '../../hooks/useSetThemeColor';
import AnimatedLoading from '../../icons/AnimatedLoading';
import { theme } from '../../style';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import memoizeOne from 'memoize-one';
import { rolloverBudget, reportBudget } from 'loot-core/src/client/queries';
import * as monthUtils from 'loot-core/src/shared/months';

import useFeatureFlag from '../../hooks/useFeatureFlag';
import { useFeatureFlag } from '../../hooks/useFeatureFlag';
import ArrowThinLeft from '../../icons/v1/ArrowThinLeft';
import ArrowThinRight from '../../icons/v1/ArrowThinRight';
import DotsHorizontalTriple from '../../icons/v1/DotsHorizontalTriple';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { type CSSProperties, useState } from 'react';

import * as monthUtils from 'loot-core/src/shared/months';

import useResizeObserver from '../../hooks/useResizeObserver';
import { useResizeObserver } from '../../hooks/useResizeObserver';
import { styles, theme } from '../../style';
import { View } from '../common/View';

Expand Down
6 changes: 3 additions & 3 deletions packages/desktop-client/src/components/budget/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ import * as monthUtils from 'loot-core/src/shared/months';
import { type GlobalPrefs, type LocalPrefs } from 'loot-core/src/types/prefs';

import { type BoundActions, useActions } from '../../hooks/useActions';
import useCategories from '../../hooks/useCategories';
import useFeatureFlag from '../../hooks/useFeatureFlag';
import useNavigate from '../../hooks/useNavigate';
import { useCategories } from '../../hooks/useCategories';
import { useFeatureFlag } from '../../hooks/useFeatureFlag';
import { useNavigate } from '../../hooks/useNavigate';
import { styles } from '../../style';
import { View } from '../common/View';
import {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { reportBudget } from 'loot-core/src/client/queries';
import evalArithmetic from 'loot-core/src/shared/arithmetic';
import { integerToCurrency, amountToInteger } from 'loot-core/src/shared/util';

import useFeatureFlag from '../../../hooks/useFeatureFlag';
import { useFeatureFlag } from '../../../hooks/useFeatureFlag';
import CheveronDown from '../../../icons/v1/CheveronDown';
import { styles, theme, type CSSProperties } from '../../../style';
import { Button } from '../../common/Button';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { css } from 'glamor';

import * as monthUtils from 'loot-core/src/shared/months';

import useFeatureFlag from '../../../../hooks/useFeatureFlag';
import { useFeatureFlag } from '../../../../hooks/useFeatureFlag';
import DotsHorizontalTriple from '../../../../icons/v1/DotsHorizontalTriple';
import ArrowButtonDown1 from '../../../../icons/v2/ArrowButtonDown1';
import ArrowButtonUp1 from '../../../../icons/v2/ArrowButtonUp1';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { type ComponentProps, useState } from 'react';

import useCategories from '../../../hooks/useCategories';
import { useCategories } from '../../../hooks/useCategories';
import { CategoryAutocomplete } from '../../autocomplete/CategoryAutocomplete';
import { Button } from '../../common/Button';
import { InitialFocus } from '../../common/InitialFocus';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { rolloverBudget } from 'loot-core/src/client/queries';
import evalArithmetic from 'loot-core/src/shared/arithmetic';
import { integerToCurrency, amountToInteger } from 'loot-core/src/shared/util';

import useFeatureFlag from '../../../hooks/useFeatureFlag';
import { useFeatureFlag } from '../../../hooks/useFeatureFlag';
import CheveronDown from '../../../icons/v1/CheveronDown';
import { styles, theme, type CSSProperties } from '../../../style';
import { Button } from '../../common/Button';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { useSpreadsheet } from 'loot-core/src/client/SpreadsheetProvider';
import evalArithmetic from 'loot-core/src/shared/arithmetic';
import { integerToCurrency, amountToInteger } from 'loot-core/src/shared/util';

import useCategories from '../../../hooks/useCategories';
import { useCategories } from '../../../hooks/useCategories';
import { CategoryAutocomplete } from '../../autocomplete/CategoryAutocomplete';
import { Button } from '../../common/Button';
import { InitialFocus } from '../../common/InitialFocus';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { type ComponentProps } from 'react';
import { useMatch } from 'react-router-dom';

import useNavigate from '../../hooks/useNavigate';
import { useNavigate } from '../../hooks/useNavigate';
import { type CSSProperties } from '../../style';

import { Button } from './Button';
Expand Down
2 changes: 1 addition & 1 deletion packages/desktop-client/src/components/common/Link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { NavLink, useMatch } from 'react-router-dom';

import { css } from 'glamor';

import useNavigate from '../../hooks/useNavigate';
import { useNavigate } from '../../hooks/useNavigate';
import { type CSSProperties, styles } from '../../style';

import { Button } from './Button';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
} from 'loot-core/src/shared/environment';

import { useActions } from '../../hooks/useActions';
import useNavigate from '../../hooks/useNavigate';
import { useNavigate } from '../../hooks/useNavigate';
import { useSetThemeColor } from '../../hooks/useSetThemeColor';
import { theme } from '../../style';
import { Button, ButtonWithLoading } from '../common/Button';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { useState } from 'react';

import { send } from 'loot-core/src/platform/client/fetch';

import useNavigate from '../../../hooks/useNavigate';
import { useNavigate } from '../../../hooks/useNavigate';
import { theme } from '../../../style';
import { Button } from '../../common/Button';
import { Text } from '../../common/Text';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import { useLocation } from 'react-router-dom';

import useNavigate from '../../../hooks/useNavigate';
import { useNavigate } from '../../../hooks/useNavigate';
import { theme } from '../../../style';
import { Button } from '../../common/Button';
import { Text } from '../../common/Text';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useLocation } from 'react-router-dom';

import { send } from 'loot-core/src/platform/client/fetch';

import useNavigate from '../../../hooks/useNavigate';
import { useNavigate } from '../../../hooks/useNavigate';
import { theme } from '../../../style';
import { useSetServerURL } from '../../ServerContext';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { useSpring, animated, config } from 'react-spring';

import { useDrag } from '@use-gesture/react';

import usePrevious from '../../hooks/usePrevious';
import { usePrevious } from '../../hooks/usePrevious';
import Add from '../../icons/v1/Add';
import Cog from '../../icons/v1/Cog';
import PiggyBank from '../../icons/v1/PiggyBank';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { useLiveQuery } from 'loot-core/src/client/query-hooks';
import q from 'loot-core/src/shared/query';
import { type CategoryGroupEntity } from 'loot-core/src/types/models';

import useCategories from '../../hooks/useCategories';
import { useCategories } from '../../hooks/useCategories';
import { DotsHorizontalTriple } from '../../icons/v1';
import Add from '../../icons/v1/Add';
import Trash from '../../icons/v1/Trash';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { useLiveQuery } from 'loot-core/src/client/query-hooks';
import q from 'loot-core/src/shared/query';
import { type CategoryEntity } from 'loot-core/src/types/models';

import useCategories from '../../hooks/useCategories';
import { useCategories } from '../../hooks/useCategories';
import { DotsHorizontalTriple } from '../../icons/v1';
import Trash from '../../icons/v1/Trash';
import NotesPaper from '../../icons/v2/NotesPaper';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { useEffect, useState } from 'react';

import { authorizeBank } from '../../gocardless';
import { useActions } from '../../hooks/useActions';
import useGoCardlessStatus from '../../hooks/useGoCardlessStatus';
import { useGoCardlessStatus } from '../../hooks/useGoCardlessStatus';
import { type SyncServerStatus } from '../../hooks/useSyncServerStatus';
import { theme } from '../../style';
import { type CommonModalProps } from '../../types/modals';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React, { useState } from 'react';
import { toRelaxedNumber } from 'loot-core/src/shared/util';

import { type BoundActions } from '../../hooks/useActions';
import useNavigate from '../../hooks/useNavigate';
import { useNavigate } from '../../hooks/useNavigate';
import { theme } from '../../style';
import { type CommonModalProps } from '../../types/modals';
import { Button } from '../common/Button';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { currentDay, dayFromDate } from 'loot-core/src/shared/months';
import { amountToInteger } from 'loot-core/src/shared/util';

import { useActions } from '../../hooks/useActions';
import useCategories from '../../hooks/useCategories';
import { useCategories } from '../../hooks/useCategories';
import { Add } from '../../icons/v1';
import { useResponsive } from '../../ResponsiveProvider';
import { styles, theme } from '../../style';
Expand Down
2 changes: 1 addition & 1 deletion packages/desktop-client/src/components/modals/EditRule.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import {
amountToInteger,
} from 'loot-core/src/shared/util';

import useSelected, { SelectedProvider } from '../../hooks/useSelected';
import { useSelected, SelectedProvider } from '../../hooks/useSelected';
import AddIcon from '../../icons/v0/Add';
import SubtractIcon from '../../icons/v0/Subtract';
import InformationOutline from '../../icons/v1/InformationOutline';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
type GoCardlessToken,
} from 'loot-core/src/types/models';

import useGoCardlessStatus from '../../hooks/useGoCardlessStatus';
import { useGoCardlessStatus } from '../../hooks/useGoCardlessStatus';
import AnimatedLoading from '../../icons/AnimatedLoading';
import DotsHorizontalTriple from '../../icons/v1/DotsHorizontalTriple';
import { theme } from '../../style';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
} from 'loot-core/src/shared/util';

import { useActions } from '../../hooks/useActions';
import useFeatureFlag from '../../hooks/useFeatureFlag';
import { useFeatureFlag } from '../../hooks/useFeatureFlag';
import { theme, styles } from '../../style';
import { Button, ButtonWithLoading } from '../common/Button';
import { Input } from '../common/Input';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,13 @@ import memoizeOne from 'memoize-one';

import { groupById } from 'loot-core/src/shared/util';

import useSelected, {
import {
useSelected,
SelectedProvider,
useSelectedDispatch,
useSelectedItems,
} from '../../hooks/useSelected';
import useStableCallback from '../../hooks/useStableCallback';
import { useStableCallback } from '../../hooks/useStableCallback';
import ExpandArrow from '../../icons/v0/ExpandArrow';
import { theme } from '../../style';
import { Button } from '../common/Button';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { send, listen } from 'loot-core/src/platform/client/fetch';
import { applyChanges } from 'loot-core/src/shared/util';

import { useActions } from '../../hooks/useActions';
import useCategories from '../../hooks/useCategories';
import { useCategories } from '../../hooks/useCategories';

import { ManagePayees } from './ManagePayees';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import { useSelector } from 'react-redux';

import useFeatureFlag from '../../hooks/useFeatureFlag';
import { useFeatureFlag } from '../../hooks/useFeatureFlag';
import { styles } from '../../style';
import { View } from '../common/View';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { send } from 'loot-core/src/platform/client/fetch';
import * as monthUtils from 'loot-core/src/shared/months';
import { integerToCurrency } from 'loot-core/src/shared/util';

import useFilters from '../../../hooks/useFilters';
import { useFilters } from '../../../hooks/useFilters';
import { theme, styles } from '../../../style';
import { AlignedText } from '../../common/AlignedText';
import { Block } from '../../common/Block';
Expand Down
Loading

0 comments on commit 6f0b02f

Please sign in to comment.