Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESLint no-default-exports 3 #2117

Merged
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
17 changes: 17 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,24 @@ 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/AlignedText.tsx',
'./packages/desktop-client/src/components/common/AnchorLink.tsx',
'./packages/desktop-client/src/components/common/Block.tsx',
'./packages/desktop-client/src/components/common/Button.tsx',
'./packages/desktop-client/src/components/common/ButtonLink.tsx',
'./packages/desktop-client/src/components/common/Card.tsx',
'./packages/desktop-client/src/components/common/ExternalLink.tsx',
'./packages/desktop-client/src/components/common/FormError.tsx',
'./packages/desktop-client/src/components/common/HoverTarget.tsx',
'./packages/desktop-client/src/components/common/InitialFocus.tsx',
'./packages/desktop-client/src/components/common/InlineField.tsx',
'./packages/desktop-client/src/components/common/Input.tsx',
'./packages/desktop-client/src/components/common/InputWithContent.tsx',
'./packages/desktop-client/src/components/common/Label.tsx',
'./packages/desktop-client/src/components/common/Link.tsx',
'./packages/desktop-client/src/components/common/LinkButton.tsx',
'./packages/desktop-client/src/components/common/Menu.tsx',
'./packages/desktop-client/src/components/common/MenuTooltip.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/AppBackground.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import AnimatedLoading from '../icons/AnimatedLoading';
import { theme } from '../style';

import { Background } from './Background';
import Block from './common/Block';
import { Block } from './common/Block';
import View from './common/View';

type AppBackgroundProps = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { theme } from '../style';

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

export function DevelopmentTopBar() {
Expand Down
6 changes: 3 additions & 3 deletions packages/desktop-client/src/components/FatalError.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React, { useState } from 'react';

import Block from './common/Block';
import { Block } from './common/Block';
import { Button } from './common/Button';
import ExternalLink from './common/ExternalLink';
import LinkButton from './common/LinkButton';
import { ExternalLink } from './common/ExternalLink';
import { LinkButton } from './common/LinkButton';
import Modal from './common/Modal';
import Paragraph from './common/Paragraph';
import Stack from './common/Stack';
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 @@ -5,7 +5,7 @@ import { useActions } from '../hooks/useActions';
import { theme, styles, type CSSProperties } from '../style';

import { Button } from './common/Button';
import Menu from './common/Menu';
import { Menu } from './common/Menu';
import Text from './common/Text';
import View from './common/View';
import { useServerURL } from './ServerContext';
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 @@ -21,7 +21,7 @@ import useSelected, { SelectedProvider } from '../hooks/useSelected';
import { theme } from '../style';

import { Button } from './common/Button';
import ExternalLink from './common/ExternalLink';
import { ExternalLink } from './common/ExternalLink';
import Search from './common/Search';
import Stack from './common/Stack';
import Text from './common/Text';
Expand Down
4 changes: 2 additions & 2 deletions packages/desktop-client/src/components/Notifications.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import Delete from '../icons/v0/Delete';
import { styles, theme, type CSSProperties } from '../style';

import { Button, ButtonWithLoading } from './common/Button';
import ExternalLink from './common/ExternalLink';
import LinkButton from './common/LinkButton';
import { ExternalLink } from './common/ExternalLink';
import { LinkButton } from './common/LinkButton';
import Stack from './common/Stack';
import Text from './common/Text';
import View from './common/View';
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 @@ -10,7 +10,7 @@ import { useResponsive } from '../ResponsiveProvider';
import { type CSSProperties, themeOptions, useTheme } from '../style';

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

type ThemeSelectorProps = {
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 @@ -29,8 +29,8 @@ import AccountSyncCheck from './accounts/AccountSyncCheck';
import { AnimatedRefresh } from './AnimatedRefresh';
import { MonthCountSelector } from './budget/MonthCountSelector';
import { Button, ButtonWithLoading } from './common/Button';
import ExternalLink from './common/ExternalLink';
import Link from './common/Link';
import { ExternalLink } from './common/ExternalLink';
import { Link } from './common/Link';
import Paragraph from './common/Paragraph';
import Text from './common/Text';
import View from './common/View';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Close from '../icons/v1/Close';
import { theme } from '../style';

import { Button } from './common/Button';
import LinkButton from './common/LinkButton';
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 @@ -7,7 +7,7 @@ import { useActions } from '../../hooks/useActions';
import ExclamationOutline from '../../icons/v1/ExclamationOutline';
import { theme } from '../../style';
import { Button } from '../common/Button';
import ExternalLink from '../common/ExternalLink';
import { ExternalLink } from '../common/ExternalLink';
import View from '../common/View';
import { Tooltip } from '../tooltips';

Expand Down
8 changes: 4 additions & 4 deletions packages/desktop-client/src/components/accounts/Header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ import Pencil1 from '../../icons/v2/Pencil1';
import { theme, styles } from '../../style';
import { AnimatedRefresh } from '../AnimatedRefresh';
import { Button } from '../common/Button';
import InitialFocus from '../common/InitialFocus';
import Input from '../common/Input';
import Menu from '../common/Menu';
import { InitialFocus } from '../common/InitialFocus';
import { Input } from '../common/Input';
import { Menu } from '../common/Menu';
import MenuButton from '../common/MenuButton';
import MenuTooltip from '../common/MenuTooltip';
import { MenuTooltip } from '../common/MenuTooltip';
import Search from '../common/Search';
import Stack from '../common/Stack';
import View from '../common/View';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import { useActions } from '../../hooks/useActions';
import Add from '../../icons/v1/Add';
import SearchAlternate from '../../icons/v2/SearchAlternate';
import { theme } from '../../style';
import ButtonLink from '../common/ButtonLink';
import InputWithContent from '../common/InputWithContent';
import Label from '../common/Label';
import { ButtonLink } from '../common/ButtonLink';
import { InputWithContent } from '../common/InputWithContent';
import { Label } from '../common/Label';
import View from '../common/View';
import { MobileBackButton } from '../MobileBackButton';
import { Page } from '../Page';
Expand Down
4 changes: 2 additions & 2 deletions packages/desktop-client/src/components/accounts/Reconcile.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ 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 InitialFocus from '../common/InitialFocus';
import Input from '../common/Input';
import { InitialFocus } from '../common/InitialFocus';
import { Input } from '../common/Input';
import Text from '../common/Text';
import View from '../common/View';
import useFormat from '../spreadsheet/useFormat';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { css } from 'glamor';
import Remove from '../../icons/v2/Remove';
import { theme, type CSSProperties } from '../../style';
import { Button } from '../common/Button';
import Input from '../common/Input';
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 @@ -3,7 +3,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 Menu from '../common/Menu';
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
Expand Up @@ -13,9 +13,9 @@ import DotsHorizontalTriple from '../../icons/v1/DotsHorizontalTriple';
import { useResponsive } from '../../ResponsiveProvider';
import { theme, styles } from '../../style';
import { Button } from '../common/Button';
import Card from '../common/Card';
import Label from '../common/Label';
import Menu from '../common/Menu';
import { Card } from '../common/Card';
import { Label } from '../common/Label';
import { Menu } from '../common/Menu';
import Text from '../common/Text';
import View from '../common/View';
import { Page } from '../Page';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,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 Menu from '../common/Menu';
import { Menu } from '../common/Menu';
import View from '../common/View';
import { NotesButton } from '../NotesButton';
import { InputCell } from '../table';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import ExpandArrow from '../../icons/v0/ExpandArrow';
import CheveronDown from '../../icons/v1/CheveronDown';
import { theme } from '../../style';
import { Button } from '../common/Button';
import Menu from '../common/Menu';
import { Menu } from '../common/Menu';
import Text from '../common/Text';
import View from '../common/View';
import { NotesButton } from '../NotesButton';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';

import { reportBudget } from 'loot-core/src/client/queries';

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import useFeatureFlag from '../../../hooks/useFeatureFlag';
import CheveronDown from '../../../icons/v1/CheveronDown';
import { styles, theme, type CSSProperties } from '../../../style';
import { Button } from '../../common/Button';
import Menu from '../../common/Menu';
import { Menu } from '../../common/Menu';
import Text from '../../common/Text';
import View from '../../common/View';
import CellValue from '../../spreadsheet/CellValue';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import ArrowButtonDown1 from '../../../../icons/v2/ArrowButtonDown1';
import ArrowButtonUp1 from '../../../../icons/v2/ArrowButtonUp1';
import { theme, styles } from '../../../../style';
import { Button } from '../../../common/Button';
import Menu from '../../../common/Menu';
import { Menu } from '../../../common/Menu';
import Stack from '../../../common/Stack';
import View from '../../../common/View';
import { NotesButton } from '../../../NotesButton';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { css } from 'glamor';
import { reportBudget } from 'loot-core/src/client/queries';

import { theme, type CSSProperties, styles } from '../../../../style';
import AlignedText from '../../../common/AlignedText';
import HoverTarget from '../../../common/HoverTarget';
import { AlignedText } from '../../../common/AlignedText';
import { HoverTarget } from '../../../common/HoverTarget';
import Text from '../../../common/Text';
import View from '../../../common/View';
import { PrivacyFilter } from '../../../PrivacyFilter';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { useState } from 'react';

import { rolloverBudget } from 'loot-core/src/client/queries';

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React, { type ComponentProps, useState } from 'react';
import useCategories from '../../../hooks/useCategories';
import CategoryAutocomplete from '../../autocomplete/CategoryAutocomplete';
import { Button } from '../../common/Button';
import InitialFocus from '../../common/InitialFocus';
import { InitialFocus } from '../../common/InitialFocus';
import View from '../../common/View';
import { Tooltip } from '../../tooltips';
import { addToBeBudgetedGroup } from '../util';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import evalArithmetic from 'loot-core/src/shared/arithmetic';
import { integerToCurrency, amountToInteger } from 'loot-core/src/shared/util';

import { Button } from '../../common/Button';
import InitialFocus from '../../common/InitialFocus';
import Input from '../../common/Input';
import { InitialFocus } from '../../common/InitialFocus';
import { Input } from '../../common/Input';
import View from '../../common/View';
import NamespaceContext from '../../spreadsheet/NamespaceContext';
import { Tooltip } from '../../tooltips';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import useFeatureFlag from '../../../hooks/useFeatureFlag';
import CheveronDown from '../../../icons/v1/CheveronDown';
import { styles, theme, type CSSProperties } from '../../../style';
import { Button } from '../../common/Button';
import Menu from '../../common/Menu';
import { Menu } from '../../common/Menu';
import Text from '../../common/Text';
import View from '../../common/View';
import CellValue from '../../spreadsheet/CellValue';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ 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 InitialFocus from '../../common/InitialFocus';
import Input from '../../common/Input';
import { InitialFocus } from '../../common/InitialFocus';
import { Input } from '../../common/Input';
import View from '../../common/View';
import NamespaceContext from '../../spreadsheet/NamespaceContext';
import { Tooltip } from '../../tooltips';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import ArrowButtonDown1 from '../../../../icons/v2/ArrowButtonDown1';
import ArrowButtonUp1 from '../../../../icons/v2/ArrowButtonUp1';
import { theme, styles } from '../../../../style';
import { Button } from '../../../common/Button';
import Menu from '../../../common/Menu';
import { Menu } from '../../../common/Menu';
import View from '../../../common/View';
import { NotesButton } from '../../../NotesButton';
import NamespaceContext from '../../../spreadsheet/NamespaceContext';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import { css } from 'glamor';
import { rolloverBudget } from 'loot-core/src/client/queries';

import { theme, styles, type CSSProperties } from '../../../../style';
import Block from '../../../common/Block';
import HoverTarget from '../../../common/HoverTarget';
import Menu from '../../../common/Menu';
import { Block } from '../../../common/Block';
import { HoverTarget } from '../../../common/HoverTarget';
import { Menu } from '../../../common/Menu';
import View from '../../../common/View';
import { PrivacyFilter } from '../../../PrivacyFilter';
import useFormat from '../../../spreadsheet/useFormat';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import React from 'react';
import { rolloverBudget } from 'loot-core/src/client/queries';

import { styles, type CSSProperties } from '../../../../style';
import AlignedText from '../../../common/AlignedText';
import Block from '../../../common/Block';
import HoverTarget from '../../../common/HoverTarget';
import { AlignedText } from '../../../common/AlignedText';
import { Block } from '../../../common/Block';
import { HoverTarget } from '../../../common/HoverTarget';
import View from '../../../common/View';
import CellValue from '../../../spreadsheet/CellValue';
import useFormat from '../../../spreadsheet/useFormat';
Expand Down
4 changes: 2 additions & 2 deletions packages/desktop-client/src/components/common/AlignedText.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { type ComponentProps } from 'react';

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

import Block from './Block';
import { Block } from './Block';
import View from './View';

type AlignedTextProps = ComponentProps<typeof View> & {
Expand All @@ -13,7 +13,7 @@ type AlignedTextProps = ComponentProps<typeof View> & {
rightStyle?: CSSProperties;
truncate?: 'left' | 'right';
};
export default function AlignedText({
export function AlignedText({
left,
right,
style,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ type AnchorLinkProps = {
children?: ReactNode;
};

export default function AnchorLink({
export function AnchorLink({
to,
style,
activeStyle,
Expand Down
2 changes: 1 addition & 1 deletion packages/desktop-client/src/components/common/Block.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ type BlockProps = HTMLProps<HTMLDivElement> & {
innerRef?: Ref<HTMLDivElement>;
};

export default function Block(props: BlockProps) {
export function Block(props: BlockProps) {
const { className = '', style, innerRef, ...restProps } = props;
return (
<div
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ type ButtonLinkProps = ComponentProps<typeof Button> & {
to: string;
activeStyle?: CSSProperties;
};
export default function ButtonLink({
export function ButtonLink({
to,
style,
activeStyle,
Expand Down
4 changes: 1 addition & 3 deletions packages/desktop-client/src/components/common/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import View from './View';

type CardProps = ComponentProps<typeof View>;

const Card = forwardRef<HTMLDivElement, CardProps>(
export const Card = forwardRef<HTMLDivElement, CardProps>(
({ children, ...props }, ref) => {
return (
<View
Expand Down Expand Up @@ -35,5 +35,3 @@ const Card = forwardRef<HTMLDivElement, CardProps>(
);
},
);

export default Card;
Loading
Loading