Skip to content

Commit

Permalink
ESLint no-default-exports 5 - Text.tsx (#2119)
Browse files Browse the repository at this point in the history
* Fix default imports

* Fix manager Modals import

* ESLint no-default-exports part 5 - Text.tsx

* Fix default import

* Release notes
  • Loading branch information
joel-jeremy authored Jan 6, 2024
1 parent 5d29585 commit 829c83a
Show file tree
Hide file tree
Showing 95 changed files with 100 additions and 96 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ module.exports = {
'./packages/desktop-client/src/components/common/Search.tsx',
'./packages/desktop-client/src/components/common/Select.tsx',
'./packages/desktop-client/src/components/common/Stack.tsx',
// './packages/desktop-client/src/components/common/Text.tsx',
'./packages/desktop-client/src/components/common/Text.tsx',
'./packages/desktop-client/src/components/common/TextOneLine.tsx',
// './packages/desktop-client/src/components/common/View.tsx',
// './packages/desktop-client/src/components/common/**/*',
Expand Down
2 changes: 1 addition & 1 deletion packages/desktop-client/src/components/BankSyncStatus.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { useTransition, animated } from 'react-spring';
import { theme, styles } from '../style';

import { AnimatedRefresh } from './AnimatedRefresh';
import Text from './common/Text';
import { Text } from './common/Text';
import View from './common/View';

export function BankSyncStatus() {
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
Expand Up @@ -7,7 +7,7 @@ import { LinkButton } from './common/LinkButton';
import { Modal } from './common/Modal';
import { Paragraph } from './common/Paragraph';
import { Stack } from './common/Stack';
import Text from './common/Text';
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/LoggedInUser.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { theme, styles, type CSSProperties } from '../style';

import { Button } from './common/Button';
import { Menu } from './common/Menu';
import Text from './common/Text';
import { Text } from './common/Text';
import View from './common/View';
import { useServerURL } from './ServerContext';
import { Tooltip } from './tooltips';
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 @@ -24,7 +24,7 @@ import { Button } from './common/Button';
import { ExternalLink } from './common/ExternalLink';
import { Search } from './common/Search';
import { Stack } from './common/Stack';
import Text from './common/Text';
import { Text } from './common/Text';
import View from './common/View';
import RulesHeader from './rules/RulesHeader';
import RulesList from './rules/RulesList';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import CheveronLeft from '../icons/v1/CheveronLeft';
import { type CSSProperties, styles, theme } from '../style';

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

type MobileBackButtonProps = {
style?: CSSProperties;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { useResponsive } from '../ResponsiveProvider';
import { theme, styles } from '../style';

import { Button } from './common/Button';
import Text from './common/Text';
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/Notes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { useResponsive } from '../ResponsiveProvider';
import { type CSSProperties, theme } from '../style';
import { remarkBreaks, sequentialNewlinesPlugin } from '../util/markdown';

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

const remarkPlugins = [sequentialNewlinesPlugin, remarkGfm, remarkBreaks];

Expand Down
2 changes: 1 addition & 1 deletion packages/desktop-client/src/components/Notifications.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { Button, ButtonWithLoading } from './common/Button';
import { ExternalLink } from './common/ExternalLink';
import { LinkButton } from './common/LinkButton';
import { Stack } from './common/Stack';
import Text from './common/Text';
import { Text } from './common/Text';
import View from './common/View';

function compileMessage(
Expand Down
2 changes: 1 addition & 1 deletion packages/desktop-client/src/components/Page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React, { type ComponentPropsWithoutRef, type ReactNode } from 'react';
import { useResponsive } from '../ResponsiveProvider';
import { theme, styles, type CSSProperties } from '../style';

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

type PageHeaderProps = {
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 @@ -32,7 +32,7 @@ import { Button, ButtonWithLoading } from './common/Button';
import { ExternalLink } from './common/ExternalLink';
import { Link } from './common/Link';
import { Paragraph } from './common/Paragraph';
import Text from './common/Text';
import { Text } from './common/Text';
import View from './common/View';
import { KeyHandlers } from './KeyHandlers';
import { LoggedInUser } from './LoggedInUser';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { theme } from '../style';

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

function closeNotification(setAppState) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import useCategories from '../../hooks/useCategories';
import { SelectedProviderWithItems } from '../../hooks/useSelected';
import { styles, theme } from '../../style';
import { Button } from '../common/Button';
import Text from '../common/Text';
import { Text } from '../common/Text';
import View from '../common/View';
import TransactionList from '../transactions/TransactionList';
import {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { useSelectedItems } from '../../hooks/useSelected';
import ArrowButtonRight1 from '../../icons/v2/ArrowButtonRight1';
import { theme } from '../../style';
import { Button } from '../common/Button';
import Text from '../common/Text';
import { Text } from '../common/Text';
import View from '../common/View';
import { PrivacyFilter } from '../PrivacyFilter';
import CellValue from '../spreadsheet/CellValue';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { useSetThemeColor } from '../../hooks/useSetThemeColor';
import Add from '../../icons/v1/Add';
import { theme, styles } from '../../style';
import { Button } from '../common/Button';
import Text from '../common/Text';
import { Text } from '../common/Text';
import { TextOneLine } from '../common/TextOneLine';
import View from '../common/View';
import { Page } from '../Page';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { styles, theme } from '../../style';
import { Button } from '../common/Button';
import { InitialFocus } from '../common/InitialFocus';
import { Input } from '../common/Input';
import Text from '../common/Text';
import { Text } from '../common/Text';
import View from '../common/View';
import useFormat from '../spreadsheet/useFormat';
import useSheetValue from '../spreadsheet/useSheetValue';
Expand Down
2 changes: 1 addition & 1 deletion packages/desktop-client/src/components/alerts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import ExclamationOutline from '../icons/v1/ExclamationOutline';
import InformationOutline from '../icons/v1/InformationOutline';
import { styles, theme, type CSSProperties } from '../style';

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

type AlertProps = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
import Split from '../../icons/v0/Split';
import { useResponsive } from '../../ResponsiveProvider';
import { type CSSProperties, theme } from '../../style';
import Text from '../common/Text';
import { Text } from '../common/Text';
import View from '../common/View';

import Autocomplete, { defaultFilterSuggestion } from './Autocomplete';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { Button } from '../common/Button';
import { Card } from '../common/Card';
import { Label } from '../common/Label';
import { Menu } from '../common/Menu';
import Text from '../common/Text';
import { Text } from '../common/Text';
import View from '../common/View';
import { Page } from '../Page';
import PullToRefresh from '../responsive/PullToRefresh';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import CheveronDown from '../../icons/v1/CheveronDown';
import { theme } from '../../style';
import { Button } from '../common/Button';
import { Menu } from '../common/Menu';
import Text from '../common/Text';
import { Text } from '../common/Text';
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 @@ -9,7 +9,7 @@ import CheveronDown from '../../../icons/v1/CheveronDown';
import { styles, theme, type CSSProperties } from '../../../style';
import { Button } from '../../common/Button';
import { Menu } from '../../common/Menu';
import Text from '../../common/Text';
import { Text } from '../../common/Text';
import View from '../../common/View';
import CellValue from '../../spreadsheet/CellValue';
import useFormat from '../../spreadsheet/useFormat';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import React, {
} from 'react';

import { theme, styles } from '../../../../style';
import Text from '../../../common/Text';
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 @@ -7,7 +7,7 @@ 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 Text from '../../../common/Text';
import { Text } from '../../../common/Text';
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 @@ -9,7 +9,7 @@ import CheveronDown from '../../../icons/v1/CheveronDown';
import { styles, theme, type CSSProperties } from '../../../style';
import { Button } from '../../common/Button';
import { Menu } from '../../common/Menu';
import Text from '../../common/Text';
import { Text } from '../../common/Text';
import View from '../../common/View';
import CellValue from '../../spreadsheet/CellValue';
import useFormat from '../../spreadsheet/useFormat';
Expand Down
2 changes: 1 addition & 1 deletion packages/desktop-client/src/components/common/Label.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { type ReactNode } from 'react';

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

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

type LabelProps = {
title: ReactNode;
Expand Down
2 changes: 1 addition & 1 deletion packages/desktop-client/src/components/common/Menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {

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

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

type KeybindingProps = {
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 @@ -16,7 +16,7 @@ import { tokens } from '../../tokens';

import { Button } from './Button';
import { Input } from './Input';
import Text from './Text';
import { Text } from './Text';
import View from './View';

type ModalChildrenProps = {
Expand Down
2 changes: 1 addition & 1 deletion packages/desktop-client/src/components/common/Stack.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import React, {

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

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

function getChildren(key, children) {
Expand Down
4 changes: 1 addition & 3 deletions packages/desktop-client/src/components/common/Text.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ type TextProps = HTMLProps<HTMLSpanElement> & {
style?: CSSProperties;
};

const Text = (props: TextProps) => {
export const Text = (props: TextProps) => {
const { className = '', style, innerRef, ...restProps } = props;
return (
<span
Expand All @@ -21,5 +21,3 @@ const Text = (props: TextProps) => {
/>
);
};

export default Text;
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { type ComponentProps } from 'react';

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

type TextOneLineProps = ComponentProps<typeof Text>;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import { HoverTarget } from '../common/HoverTarget';
import { Menu } from '../common/Menu';
import { Select } from '../common/Select';
import { Stack } from '../common/Stack';
import Text from '../common/Text';
import { Text } from '../common/Text';
import View from '../common/View';
import Value from '../rules/Value';
import { Tooltip } from '../tooltips';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { Button } from '../common/Button';
import { Menu } from '../common/Menu';
import { MenuTooltip } from '../common/MenuTooltip';
import { Stack } from '../common/Stack';
import Text from '../common/Text';
import { Text } from '../common/Text';
import View from '../common/View';
import { FormField, FormLabel } from '../forms';
import { FieldSelect } from '../modals/EditRule';
Expand Down
2 changes: 1 addition & 1 deletion packages/desktop-client/src/components/forms.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { css } from 'glamor';

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

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

type SectionLabelProps = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { styles, theme } from '../../style';
import { tokens } from '../../tokens';
import { Button } from '../common/Button';
import { Menu } from '../common/Menu';
import Text from '../common/Text';
import { Text } from '../common/Text';
import View from '../common/View';
import { Tooltip } from '../tooltips';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { useSetThemeColor } from '../../hooks/useSetThemeColor';
import { theme } from '../../style';
import { Button, ButtonWithLoading } from '../common/Button';
import { BigInput } from '../common/Input';
import Text from '../common/Text';
import { Text } from '../common/Text';
import View from '../common/View';
import { useServerURL, useSetServerURL } from '../ServerContext';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { theme } from '../../style';
import { type CommonModalProps } from '../../types/modals';
import { ButtonWithLoading } from '../common/Button';
import { Modal } from '../common/Modal';
import Text from '../common/Text';
import { Text } from '../common/Text';
import View from '../common/View';

type DeleteFileProps = {
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 @@ -6,7 +6,7 @@ import { type CommonModalProps } from '../../types/modals';
import { Block } from '../common/Block';
import { Button } from '../common/Button';
import { Modal } from '../common/Modal';
import Text from '../common/Text';
import { Text } from '../common/Text';
import View from '../common/View';

function getErrorMessage(error: 'not-ynab4' | boolean) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { useActions } from '../../hooks/useActions';
import { theme } from '../../style';
import { tokens } from '../../tokens';
import { ExposeNavigate } from '../../util/router-tools';
import Text from '../common/Text';
import { Text } from '../common/Text';
import View from '../common/View';
import { LoggedInUser } from '../LoggedInUser';
import { Notifications } from '../Notifications';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';

import { Link } from '../common/Link';
import Text from '../common/Text';
import { Text } from '../common/Text';
import View from '../common/View';
import { useServerURL } from '../ServerContext';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { styles, theme } from '../../style';
import { Button } from '../common/Button';
import { ExternalLink } from '../common/ExternalLink';
import { Paragraph } from '../common/Paragraph';
import Text from '../common/Text';
import { Text } from '../common/Text';
import View from '../common/View';

export default function WelcomeScreen() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { theme } from '../../../style';
import { Button } from '../../common/Button';
import { ExternalLink } from '../../common/ExternalLink';
import { Paragraph } from '../../common/Paragraph';
import Text from '../../common/Text';
import { Text } from '../../common/Text';
import View from '../../common/View';

import { useBootstrapped, Title } from './common';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { send } from 'loot-core/src/platform/client/fetch';
import useNavigate from '../../../hooks/useNavigate';
import { theme } from '../../../style';
import { Button } from '../../common/Button';
import Text from '../../common/Text';
import { Text } from '../../common/Text';
import View from '../../common/View';

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

function getErrorMessage(reason) {
Expand Down
Loading

0 comments on commit 829c83a

Please sign in to comment.