Skip to content

Commit

Permalink
ESLint no default imports - Button
Browse files Browse the repository at this point in the history
  • Loading branch information
joel-jeremy committed Jan 3, 2024
1 parent b752721 commit 80c6dc5
Show file tree
Hide file tree
Showing 89 changed files with 89 additions and 90 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ module.exports = {
// './packages/desktop-client/src/components/accounts/**/*',
// './packages/desktop-client/src/components/autocomplete/**/*',
// './packages/desktop-client/src/components/budget/**/*',
'./packages/desktop-client/src/components/common/Button.tsx',
// './packages/desktop-client/src/components/common/**/*',
// './packages/desktop-client/src/components/filters/**/*',
// './packages/desktop-client/src/components/gocardless/**/*',
Expand Down
2 changes: 1 addition & 1 deletion packages/desktop-client/src/components/FatalError.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useState } from 'react';

import Block from './common/Block';
import Button from './common/Button';
import { Button } from './common/Button';
import ExternalLink from './common/ExternalLink';
import LinkButton from './common/LinkButton';
import Modal from './common/Modal';
Expand Down
2 changes: 1 addition & 1 deletion packages/desktop-client/src/components/LoggedInUser.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { useSelector } from 'react-redux';
import { useActions } from '../hooks/useActions';
import { theme, styles, type CSSProperties } from '../style';

import Button from './common/Button';
import { Button } from './common/Button';
import Menu from './common/Menu';
import Text from './common/Text';
import View from './common/View';
Expand Down
2 changes: 1 addition & 1 deletion packages/desktop-client/src/components/ManageRules.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import useCategories from '../hooks/useCategories';
import useSelected, { SelectedProvider } from '../hooks/useSelected';
import { theme } from '../style';

import Button from './common/Button';
import { Button } from './common/Button';
import ExternalLink from './common/ExternalLink';
import Search from './common/Search';
import Stack from './common/Stack';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import useNavigate from '../hooks/useNavigate';
import CheveronLeft from '../icons/v1/CheveronLeft';
import { type CSSProperties, styles, theme } from '../style';

import Button from './common/Button';
import { Button } from './common/Button';
import Text from './common/Text';

type MobileBackButtonProps = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { savePrefs } from 'loot-core/src/client/actions';
import { useResponsive } from '../ResponsiveProvider';
import { theme, styles } from '../style';

import Button from './common/Button';
import { Button } from './common/Button';
import Text from './common/Text';
import View from './common/View';
import { Checkbox } from './forms';
Expand Down
2 changes: 1 addition & 1 deletion packages/desktop-client/src/components/NotesButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { send } from 'loot-core/src/platform/client/fetch';
import CustomNotesPaper from '../icons/v2/CustomNotesPaper';
import { type CSSProperties, theme } from '../style';

import Button from './common/Button';
import { Button } from './common/Button';
import View from './common/View';
import { Notes } from './Notes';
import { Tooltip, type TooltipPosition, useTooltip } from './tooltips';
Expand Down
2 changes: 1 addition & 1 deletion packages/desktop-client/src/components/ThemeSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import System from '../icons/v2/System';
import { useResponsive } from '../ResponsiveProvider';
import { type CSSProperties, themeOptions, useTheme } from '../style';

import Button from './common/Button';
import { Button } from './common/Button';
import Menu from './common/Menu';
import { Tooltip } from './tooltips';

Expand Down
2 changes: 1 addition & 1 deletion packages/desktop-client/src/components/Titlebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { theme, type CSSProperties, styles } from '../style';
import AccountSyncCheck from './accounts/AccountSyncCheck';
import { AnimatedRefresh } from './AnimatedRefresh';
import { MonthCountSelector } from './budget/MonthCountSelector';
import Button, { ButtonWithLoading } from './common/Button';
import { Button, ButtonWithLoading } from './common/Button';
import ExternalLink from './common/ExternalLink';
import Link from './common/Link';
import Paragraph from './common/Paragraph';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { useActions } from '../hooks/useActions';
import Close from '../icons/v1/Close';
import { theme } from '../style';

import Button from './common/Button';
import { Button } from './common/Button';
import LinkButton from './common/LinkButton';
import Text from './common/Text';
import View from './common/View';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import { authorizeBank } from '../../gocardless';
import useCategories from '../../hooks/useCategories';
import { SelectedProviderWithItems } from '../../hooks/useSelected';
import { styles, theme } from '../../style';
import Button from '../common/Button';
import { Button } from '../common/Button';
import Text from '../common/Text';
import View from '../common/View';
import TransactionList from '../transactions/TransactionList';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { authorizeBank } from '../../gocardless';
import { useActions } from '../../hooks/useActions';
import ExclamationOutline from '../../icons/v1/ExclamationOutline';
import { theme } from '../../style';
import Button from '../common/Button';
import { Button } from '../common/Button';
import ExternalLink from '../common/ExternalLink';
import View from '../common/View';
import { Tooltip } from '../tooltips';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { getScheduledAmount } from 'loot-core/src/shared/schedules';
import { useSelectedItems } from '../../hooks/useSelected';
import ArrowButtonRight1 from '../../icons/v2/ArrowButtonRight1';
import { theme } from '../../style';
import Button from '../common/Button';
import { Button } from '../common/Button';
import Text from '../common/Text';
import View from '../common/View';
import { PrivacyFilter } from '../PrivacyFilter';
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
Expand Up @@ -9,7 +9,7 @@ import DownloadThickBottom from '../../icons/v2/DownloadThickBottom';
import Pencil1 from '../../icons/v2/Pencil1';
import { theme, styles } from '../../style';
import { AnimatedRefresh } from '../AnimatedRefresh';
import Button from '../common/Button';
import { Button } from '../common/Button';
import InitialFocus from '../common/InitialFocus';
import Input from '../common/Input';
import Menu from '../common/Menu';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import useNavigate from '../../hooks/useNavigate';
import { useSetThemeColor } from '../../hooks/useSetThemeColor';
import Add from '../../icons/v1/Add';
import { theme, styles } from '../../style';
import Button from '../common/Button';
import { Button } from '../common/Button';
import Text from '../common/Text';
import TextOneLine from '../common/TextOneLine';
import View from '../common/View';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { currencyToInteger } from 'loot-core/src/shared/util';

import CheckCircle1 from '../../icons/v2/CheckCircle1';
import { styles, theme } from '../../style';
import Button from '../common/Button';
import { Button } from '../common/Button';
import InitialFocus from '../common/InitialFocus';
import Input from '../common/Input';
import Text from '../common/Text';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { css } from 'glamor';

import Remove from '../../icons/v2/Remove';
import { theme, type CSSProperties } from '../../style';
import Button from '../common/Button';
import { Button } from '../common/Button';
import Input from '../common/Input';
import View from '../common/View';
import { Tooltip } from '../tooltips';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import {
import Add from '../../icons/v1/Add';
import { useResponsive } from '../../ResponsiveProvider';
import { type CSSProperties, theme } from '../../style';
import Button from '../common/Button';
import { Button } from '../common/Button';
import View from '../common/View';

import Autocomplete, {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { type ComponentProps, memo, useState } from 'react';

import DotsHorizontalTriple from '../../icons/v1/DotsHorizontalTriple';
import { theme, styles } from '../../style';
import Button from '../common/Button';
import { Button } from '../common/Button';
import Menu from '../common/Menu';
import View from '../common/View';
import { Tooltip } from '../tooltips';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';

import Button from '../common/Button';
import { Button } from '../common/Button';
import View from '../common/View';

import RenderMonths from './RenderMonths';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import ArrowThinRight from '../../icons/v1/ArrowThinRight';
import DotsHorizontalTriple from '../../icons/v1/DotsHorizontalTriple';
import { useResponsive } from '../../ResponsiveProvider';
import { theme, styles } from '../../style';
import Button from '../common/Button';
import { Button } from '../common/Button';
import Card from '../common/Card';
import Label from '../common/Label';
import Menu from '../common/Menu';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { type CategoryEntity } from 'loot-core/src/types/models';

import CheveronDown from '../../icons/v1/CheveronDown';
import { theme } from '../../style';
import Button from '../common/Button';
import { Button } from '../common/Button';
import Menu from '../common/Menu';
import View from '../common/View';
import { NotesButton } from '../NotesButton';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { type ConnectDragSource } from 'react-dnd';
import ExpandArrow from '../../icons/v0/ExpandArrow';
import CheveronDown from '../../icons/v1/CheveronDown';
import { theme } from '../../style';
import Button from '../common/Button';
import { Button } from '../common/Button';
import Menu from '../common/Menu';
import Text from '../common/Text';
import View from '../common/View';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { integerToCurrency, amountToInteger } from 'loot-core/src/shared/util';
import useFeatureFlag from '../../../hooks/useFeatureFlag';
import CheveronDown from '../../../icons/v1/CheveronDown';
import { styles, theme, type CSSProperties } from '../../../style';
import Button from '../../common/Button';
import { Button } from '../../common/Button';
import Menu from '../../common/Menu';
import Text from '../../common/Text';
import View from '../../common/View';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import DotsHorizontalTriple from '../../../../icons/v1/DotsHorizontalTriple';
import ArrowButtonDown1 from '../../../../icons/v2/ArrowButtonDown1';
import ArrowButtonUp1 from '../../../../icons/v2/ArrowButtonUp1';
import { theme, styles } from '../../../../style';
import Button from '../../../common/Button';
import { Button } from '../../../common/Button';
import Menu from '../../../common/Menu';
import Stack from '../../../common/Stack';
import View from '../../../common/View';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { type ComponentProps, useState } from 'react';

import useCategories from '../../../hooks/useCategories';
import CategoryAutocomplete from '../../autocomplete/CategoryAutocomplete';
import Button from '../../common/Button';
import { Button } from '../../common/Button';
import InitialFocus from '../../common/InitialFocus';
import View from '../../common/View';
import { Tooltip } from '../../tooltips';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,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 Button from '../../common/Button';
import { Button } from '../../common/Button';
import InitialFocus from '../../common/InitialFocus';
import Input from '../../common/Input';
import View from '../../common/View';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { integerToCurrency, amountToInteger } from 'loot-core/src/shared/util';
import useFeatureFlag from '../../../hooks/useFeatureFlag';
import CheveronDown from '../../../icons/v1/CheveronDown';
import { styles, theme, type CSSProperties } from '../../../style';
import Button from '../../common/Button';
import { Button } from '../../common/Button';
import Menu from '../../common/Menu';
import Text from '../../common/Text';
import View from '../../common/View';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { integerToCurrency, amountToInteger } from 'loot-core/src/shared/util';

import useCategories from '../../../hooks/useCategories';
import CategoryAutocomplete from '../../autocomplete/CategoryAutocomplete';
import Button from '../../common/Button';
import { Button } from '../../common/Button';
import InitialFocus from '../../common/InitialFocus';
import Input from '../../common/Input';
import View from '../../common/View';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import DotsHorizontalTriple from '../../../../icons/v1/DotsHorizontalTriple';
import ArrowButtonDown1 from '../../../../icons/v2/ArrowButtonDown1';
import ArrowButtonUp1 from '../../../../icons/v2/ArrowButtonUp1';
import { theme, styles } from '../../../../style';
import Button from '../../../common/Button';
import { Button } from '../../../common/Button';
import Menu from '../../../common/Menu';
import View from '../../../common/View';
import { NotesButton } from '../../../NotesButton';
Expand Down
4 changes: 1 addition & 3 deletions packages/desktop-client/src/components/common/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ const _getActiveStyles = (type, bounce) => {
}
};

const Button = forwardRef<HTMLButtonElement, ButtonProps>(
export const Button = forwardRef<HTMLButtonElement, ButtonProps>(
(
{
children,
Expand Down Expand Up @@ -245,5 +245,3 @@ export const ButtonWithLoading = forwardRef<
</Button>
);
});

export default Button;
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { useMatch } from 'react-router-dom';
import useNavigate from '../../hooks/useNavigate';
import { type CSSProperties } from '../../style';

import Button from './Button';
import { Button } from './Button';

type ButtonLinkProps = ComponentProps<typeof Button> & {
to: string;
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 @@ -6,7 +6,7 @@ import { css } from 'glamor';
import useNavigate from '../../hooks/useNavigate';
import { type CSSProperties, styles } from '../../style';

import Button from './Button';
import { Button } from './Button';

type ButtonLinkProps = ComponentProps<typeof Button> & {
to: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';

import DotsHorizontalTriple from '../../icons/v1/DotsHorizontalTriple';

import Button from './Button';
import { Button } from './Button';

export default function MenuButton({ onClick }) {
return (
Expand Down
2 changes: 1 addition & 1 deletion packages/desktop-client/src/components/common/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import Delete from '../../icons/v0/Delete';
import { type CSSProperties, styles, theme } from '../../style';
import { tokens } from '../../tokens';

import Button from './Button';
import { Button } from './Button';
import Input from './Input';
import Text from './Text';
import View from './View';
Expand Down
2 changes: 1 addition & 1 deletion packages/desktop-client/src/components/common/Search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import SvgRemove from '../../icons/v2/Remove';
import SearchAlternate from '../../icons/v2/SearchAlternate';
import { theme } from '../../style';

import Button from './Button';
import { Button } from './Button';
import InputWithContent from './InputWithContent';

type SearchProps = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';

import { Filter } from '../../icons/v1';
import Button from '../common/Button';
import { Button } from '../common/Button';

type CompactFiltersButtonProps = {
onClick: (newValue) => void;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';

import { SettingsSliderAlternate } from '../../icons/v2';
import Button from '../common/Button';
import { Button } from '../common/Button';

type FiltersButtonProps = {
onClick: (newValue) => void;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { titleFirst, integerToCurrency } from 'loot-core/src/shared/util';

import DeleteIcon from '../../icons/v0/Delete';
import { theme } from '../../style';
import Button from '../common/Button';
import { Button } from '../common/Button';
import HoverTarget from '../common/HoverTarget';
import Menu from '../common/Menu';
import Select from '../common/Select';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { send, sendCatch } from 'loot-core/src/platform/client/fetch';

import ExpandArrow from '../../icons/v0/ExpandArrow';
import { theme } from '../../style';
import Button from '../common/Button';
import { Button } from '../common/Button';
import Menu from '../common/Menu';
import MenuTooltip from '../common/MenuTooltip';
import Stack from '../common/Stack';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import Key from '../../icons/v2/Key';
import RefreshArrow from '../../icons/v2/RefreshArrow';
import { styles, theme } from '../../style';
import { tokens } from '../../tokens';
import Button from '../common/Button';
import { Button } from '../common/Button';
import Menu from '../common/Menu';
import Text from '../common/Text';
import View from '../common/View';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { useActions } from '../../hooks/useActions';
import useNavigate from '../../hooks/useNavigate';
import { useSetThemeColor } from '../../hooks/useSetThemeColor';
import { theme } from '../../style';
import Button, { ButtonWithLoading } from '../common/Button';
import { Button, ButtonWithLoading } from '../common/Button';
import { BigInput } from '../common/Input';
import Text from '../common/Text';
import View from '../common/View';
Expand Down
2 changes: 1 addition & 1 deletion packages/desktop-client/src/components/manager/Import.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { type BoundActions } from '../../hooks/useActions';
import { styles, theme } from '../../style';
import { type CommonModalProps } from '../../types/modals';
import Block from '../common/Block';
import Button from '../common/Button';
import { Button } from '../common/Button';
import Modal from '../common/Modal';
import Text from '../common/Text';
import View from '../common/View';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';

import { useActions } from '../../hooks/useActions';
import { styles, theme } from '../../style';
import Button from '../common/Button';
import { Button } from '../common/Button';
import ExternalLink from '../common/ExternalLink';
import Paragraph from '../common/Paragraph';
import Text from '../common/Text';
Expand Down
Loading

0 comments on commit 80c6dc5

Please sign in to comment.