diff --git a/.eslintrc.js b/.eslintrc.js index b2416ea8ed4..698666bb8c9 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -39,6 +39,7 @@ module.exports = { 'react-app', 'plugin:react/recommended', 'plugin:@typescript-eslint/recommended', + 'plugin:import/typescript', ], parser: '@typescript-eslint/parser', parserOptions: { project: [path.join(__dirname, './tsconfig.json')] }, @@ -63,6 +64,10 @@ module.exports = { require('confusing-browser-globals').filter(g => g !== 'self'), ), + 'react/jsx-filename-extension': [ + 'warn', + { extensions: ['.jsx', '.tsx'], allow: 'as-needed' }, + ], 'react/jsx-no-useless-fragment': 'warn', 'react/self-closing-comp': 'warn', 'react/no-unstable-nested-components': [ @@ -282,9 +287,6 @@ module.exports = { }, ], settings: { - 'import/parsers': { - '@typescript-eslint/parser': ['.ts', '.tsx'], - }, 'import/resolver': { typescript: { alwaysTryTypes: true, diff --git a/packages/desktop-client/src/components/GlobalKeys.tsx b/packages/desktop-client/src/components/GlobalKeys.ts similarity index 100% rename from packages/desktop-client/src/components/GlobalKeys.tsx rename to packages/desktop-client/src/components/GlobalKeys.ts diff --git a/packages/desktop-client/src/components/SyncRefresh.tsx b/packages/desktop-client/src/components/SyncRefresh.ts similarity index 100% rename from packages/desktop-client/src/components/SyncRefresh.tsx rename to packages/desktop-client/src/components/SyncRefresh.ts diff --git a/packages/desktop-client/src/components/accounts/Account.js b/packages/desktop-client/src/components/accounts/Account.jsx similarity index 100% rename from packages/desktop-client/src/components/accounts/Account.js rename to packages/desktop-client/src/components/accounts/Account.jsx diff --git a/packages/desktop-client/src/components/accounts/AccountSyncCheck.js b/packages/desktop-client/src/components/accounts/AccountSyncCheck.jsx similarity index 100% rename from packages/desktop-client/src/components/accounts/AccountSyncCheck.js rename to packages/desktop-client/src/components/accounts/AccountSyncCheck.jsx diff --git a/packages/desktop-client/src/components/accounts/Balance.js b/packages/desktop-client/src/components/accounts/Balance.jsx similarity index 100% rename from packages/desktop-client/src/components/accounts/Balance.js rename to packages/desktop-client/src/components/accounts/Balance.jsx diff --git a/packages/desktop-client/src/components/accounts/Header.js b/packages/desktop-client/src/components/accounts/Header.jsx similarity index 100% rename from packages/desktop-client/src/components/accounts/Header.js rename to packages/desktop-client/src/components/accounts/Header.jsx diff --git a/packages/desktop-client/src/components/accounts/MobileAccount.js b/packages/desktop-client/src/components/accounts/MobileAccount.jsx similarity index 100% rename from packages/desktop-client/src/components/accounts/MobileAccount.js rename to packages/desktop-client/src/components/accounts/MobileAccount.jsx diff --git a/packages/desktop-client/src/components/accounts/MobileAccountDetails.js b/packages/desktop-client/src/components/accounts/MobileAccountDetails.jsx similarity index 100% rename from packages/desktop-client/src/components/accounts/MobileAccountDetails.js rename to packages/desktop-client/src/components/accounts/MobileAccountDetails.jsx diff --git a/packages/desktop-client/src/components/accounts/MobileAccounts.js b/packages/desktop-client/src/components/accounts/MobileAccounts.jsx similarity index 100% rename from packages/desktop-client/src/components/accounts/MobileAccounts.js rename to packages/desktop-client/src/components/accounts/MobileAccounts.jsx diff --git a/packages/desktop-client/src/components/accounts/Reconcile.js b/packages/desktop-client/src/components/accounts/Reconcile.jsx similarity index 100% rename from packages/desktop-client/src/components/accounts/Reconcile.js rename to packages/desktop-client/src/components/accounts/Reconcile.jsx diff --git a/packages/desktop-client/src/components/budget/BudgetCategories.js b/packages/desktop-client/src/components/budget/BudgetCategories.jsx similarity index 100% rename from packages/desktop-client/src/components/budget/BudgetCategories.js rename to packages/desktop-client/src/components/budget/BudgetCategories.jsx diff --git a/packages/desktop-client/src/components/budget/BudgetTable.js b/packages/desktop-client/src/components/budget/BudgetTable.jsx similarity index 100% rename from packages/desktop-client/src/components/budget/BudgetTable.js rename to packages/desktop-client/src/components/budget/BudgetTable.jsx diff --git a/packages/desktop-client/src/components/budget/MobileBudget.js b/packages/desktop-client/src/components/budget/MobileBudget.jsx similarity index 100% rename from packages/desktop-client/src/components/budget/MobileBudget.js rename to packages/desktop-client/src/components/budget/MobileBudget.jsx diff --git a/packages/desktop-client/src/components/budget/MobileBudgetTable.js b/packages/desktop-client/src/components/budget/MobileBudgetTable.jsx similarity index 100% rename from packages/desktop-client/src/components/budget/MobileBudgetTable.js rename to packages/desktop-client/src/components/budget/MobileBudgetTable.jsx diff --git a/packages/desktop-client/src/components/common/InitialFocus.tsx b/packages/desktop-client/src/components/common/InitialFocus.ts similarity index 100% rename from packages/desktop-client/src/components/common/InitialFocus.tsx rename to packages/desktop-client/src/components/common/InitialFocus.ts diff --git a/packages/desktop-client/src/components/filters/FiltersMenu.js b/packages/desktop-client/src/components/filters/FiltersMenu.jsx similarity index 100% rename from packages/desktop-client/src/components/filters/FiltersMenu.js rename to packages/desktop-client/src/components/filters/FiltersMenu.jsx diff --git a/packages/desktop-client/src/components/filters/SavedFilters.js b/packages/desktop-client/src/components/filters/SavedFilters.jsx similarity index 100% rename from packages/desktop-client/src/components/filters/SavedFilters.js rename to packages/desktop-client/src/components/filters/SavedFilters.jsx diff --git a/packages/desktop-client/src/components/manager/BudgetList.js b/packages/desktop-client/src/components/manager/BudgetList.jsx similarity index 100% rename from packages/desktop-client/src/components/manager/BudgetList.js rename to packages/desktop-client/src/components/manager/BudgetList.jsx diff --git a/packages/desktop-client/src/components/manager/DeleteFile.js b/packages/desktop-client/src/components/manager/DeleteFile.jsx similarity index 100% rename from packages/desktop-client/src/components/manager/DeleteFile.js rename to packages/desktop-client/src/components/manager/DeleteFile.jsx diff --git a/packages/desktop-client/src/components/manager/ManagementApp.js b/packages/desktop-client/src/components/manager/ManagementApp.jsx similarity index 100% rename from packages/desktop-client/src/components/manager/ManagementApp.js rename to packages/desktop-client/src/components/manager/ManagementApp.jsx diff --git a/packages/desktop-client/src/components/manager/Modals.js b/packages/desktop-client/src/components/manager/Modals.jsx similarity index 100% rename from packages/desktop-client/src/components/manager/Modals.js rename to packages/desktop-client/src/components/manager/Modals.jsx diff --git a/packages/desktop-client/src/components/mobile/MobileAmountInput.js b/packages/desktop-client/src/components/mobile/MobileAmountInput.jsx similarity index 100% rename from packages/desktop-client/src/components/mobile/MobileAmountInput.js rename to packages/desktop-client/src/components/mobile/MobileAmountInput.jsx diff --git a/packages/desktop-client/src/components/mobile/MobileForms.js b/packages/desktop-client/src/components/mobile/MobileForms.jsx similarity index 100% rename from packages/desktop-client/src/components/mobile/MobileForms.js rename to packages/desktop-client/src/components/mobile/MobileForms.jsx diff --git a/packages/desktop-client/src/components/modals/EditField.js b/packages/desktop-client/src/components/modals/EditField.jsx similarity index 100% rename from packages/desktop-client/src/components/modals/EditField.js rename to packages/desktop-client/src/components/modals/EditField.jsx diff --git a/packages/desktop-client/src/components/modals/EditRule.js b/packages/desktop-client/src/components/modals/EditRule.jsx similarity index 100% rename from packages/desktop-client/src/components/modals/EditRule.js rename to packages/desktop-client/src/components/modals/EditRule.jsx diff --git a/packages/desktop-client/src/components/modals/ImportTransactions.js b/packages/desktop-client/src/components/modals/ImportTransactions.jsx similarity index 100% rename from packages/desktop-client/src/components/modals/ImportTransactions.js rename to packages/desktop-client/src/components/modals/ImportTransactions.jsx diff --git a/packages/desktop-client/src/components/modals/ImportTransactions.test.js b/packages/desktop-client/src/components/modals/ImportTransactions.test.jsx similarity index 100% rename from packages/desktop-client/src/components/modals/ImportTransactions.test.js rename to packages/desktop-client/src/components/modals/ImportTransactions.test.jsx diff --git a/packages/desktop-client/src/components/modals/LoadBackup.js b/packages/desktop-client/src/components/modals/LoadBackup.jsx similarity index 100% rename from packages/desktop-client/src/components/modals/LoadBackup.js rename to packages/desktop-client/src/components/modals/LoadBackup.jsx diff --git a/packages/desktop-client/src/components/modals/MergeUnusedPayees.js b/packages/desktop-client/src/components/modals/MergeUnusedPayees.jsx similarity index 100% rename from packages/desktop-client/src/components/modals/MergeUnusedPayees.js rename to packages/desktop-client/src/components/modals/MergeUnusedPayees.jsx diff --git a/packages/desktop-client/src/components/modals/SelectLinkedAccounts.js b/packages/desktop-client/src/components/modals/SelectLinkedAccounts.jsx similarity index 100% rename from packages/desktop-client/src/components/modals/SelectLinkedAccounts.js rename to packages/desktop-client/src/components/modals/SelectLinkedAccounts.jsx diff --git a/packages/desktop-client/src/components/payees/ManagePayees.js b/packages/desktop-client/src/components/payees/ManagePayees.jsx similarity index 100% rename from packages/desktop-client/src/components/payees/ManagePayees.js rename to packages/desktop-client/src/components/payees/ManagePayees.jsx diff --git a/packages/desktop-client/src/components/payees/ManagePayeesPage.js b/packages/desktop-client/src/components/payees/ManagePayeesPage.jsx similarity index 100% rename from packages/desktop-client/src/components/payees/ManagePayeesPage.js rename to packages/desktop-client/src/components/payees/ManagePayeesPage.jsx diff --git a/packages/desktop-client/src/components/payees/ManagePayeesWithData.js b/packages/desktop-client/src/components/payees/ManagePayeesWithData.jsx similarity index 100% rename from packages/desktop-client/src/components/payees/ManagePayeesWithData.js rename to packages/desktop-client/src/components/payees/ManagePayeesWithData.jsx diff --git a/packages/desktop-client/src/components/reports/Change.js b/packages/desktop-client/src/components/reports/Change.jsx similarity index 100% rename from packages/desktop-client/src/components/reports/Change.js rename to packages/desktop-client/src/components/reports/Change.jsx diff --git a/packages/desktop-client/src/components/reports/Header.js b/packages/desktop-client/src/components/reports/Header.jsx similarity index 100% rename from packages/desktop-client/src/components/reports/Header.js rename to packages/desktop-client/src/components/reports/Header.jsx diff --git a/packages/desktop-client/src/components/reports/Overview.js b/packages/desktop-client/src/components/reports/Overview.jsx similarity index 100% rename from packages/desktop-client/src/components/reports/Overview.js rename to packages/desktop-client/src/components/reports/Overview.jsx diff --git a/packages/desktop-client/src/components/reports/ReportOptions.tsx b/packages/desktop-client/src/components/reports/ReportOptions.ts similarity index 100% rename from packages/desktop-client/src/components/reports/ReportOptions.tsx rename to packages/desktop-client/src/components/reports/ReportOptions.ts diff --git a/packages/desktop-client/src/components/reports/ReportRouter.js b/packages/desktop-client/src/components/reports/ReportRouter.jsx similarity index 100% rename from packages/desktop-client/src/components/reports/ReportRouter.js rename to packages/desktop-client/src/components/reports/ReportRouter.jsx diff --git a/packages/desktop-client/src/components/reports/ReportSidebar.js b/packages/desktop-client/src/components/reports/ReportSidebar.jsx similarity index 100% rename from packages/desktop-client/src/components/reports/ReportSidebar.js rename to packages/desktop-client/src/components/reports/ReportSidebar.jsx diff --git a/packages/desktop-client/src/components/reports/ReportTopbar.js b/packages/desktop-client/src/components/reports/ReportTopbar.jsx similarity index 100% rename from packages/desktop-client/src/components/reports/ReportTopbar.js rename to packages/desktop-client/src/components/reports/ReportTopbar.jsx diff --git a/packages/desktop-client/src/components/reports/Tooltip.js b/packages/desktop-client/src/components/reports/Tooltip.jsx similarity index 100% rename from packages/desktop-client/src/components/reports/Tooltip.js rename to packages/desktop-client/src/components/reports/Tooltip.jsx diff --git a/packages/desktop-client/src/components/reports/numberFormatter.tsx b/packages/desktop-client/src/components/reports/numberFormatter.ts similarity index 100% rename from packages/desktop-client/src/components/reports/numberFormatter.tsx rename to packages/desktop-client/src/components/reports/numberFormatter.ts diff --git a/packages/desktop-client/src/components/reports/reports/CashFlowCard.js b/packages/desktop-client/src/components/reports/reports/CashFlowCard.jsx similarity index 100% rename from packages/desktop-client/src/components/reports/reports/CashFlowCard.js rename to packages/desktop-client/src/components/reports/reports/CashFlowCard.jsx diff --git a/packages/desktop-client/src/components/reports/reports/CategorySpending.js b/packages/desktop-client/src/components/reports/reports/CategorySpending.jsx similarity index 100% rename from packages/desktop-client/src/components/reports/reports/CategorySpending.js rename to packages/desktop-client/src/components/reports/reports/CategorySpending.jsx diff --git a/packages/desktop-client/src/components/reports/reports/CategorySpendingCard.js b/packages/desktop-client/src/components/reports/reports/CategorySpendingCard.jsx similarity index 100% rename from packages/desktop-client/src/components/reports/reports/CategorySpendingCard.js rename to packages/desktop-client/src/components/reports/reports/CategorySpendingCard.jsx diff --git a/packages/desktop-client/src/components/reports/reports/CustomReport.js b/packages/desktop-client/src/components/reports/reports/CustomReport.jsx similarity index 100% rename from packages/desktop-client/src/components/reports/reports/CustomReport.js rename to packages/desktop-client/src/components/reports/reports/CustomReport.jsx diff --git a/packages/desktop-client/src/components/reports/reports/CustomReportCard.js b/packages/desktop-client/src/components/reports/reports/CustomReportCard.jsx similarity index 100% rename from packages/desktop-client/src/components/reports/reports/CustomReportCard.js rename to packages/desktop-client/src/components/reports/reports/CustomReportCard.jsx diff --git a/packages/desktop-client/src/components/reports/reports/NetWorth.js b/packages/desktop-client/src/components/reports/reports/NetWorth.jsx similarity index 100% rename from packages/desktop-client/src/components/reports/reports/NetWorth.js rename to packages/desktop-client/src/components/reports/reports/NetWorth.jsx diff --git a/packages/desktop-client/src/components/reports/reports/NetWorthCard.js b/packages/desktop-client/src/components/reports/reports/NetWorthCard.jsx similarity index 100% rename from packages/desktop-client/src/components/reports/reports/NetWorthCard.js rename to packages/desktop-client/src/components/reports/reports/NetWorthCard.jsx diff --git a/packages/desktop-client/src/components/reports/reports/Sankey.js b/packages/desktop-client/src/components/reports/reports/Sankey.jsx similarity index 100% rename from packages/desktop-client/src/components/reports/reports/Sankey.js rename to packages/desktop-client/src/components/reports/reports/Sankey.jsx diff --git a/packages/desktop-client/src/components/reports/reports/SankeyCard.js b/packages/desktop-client/src/components/reports/reports/SankeyCard.jsx similarity index 100% rename from packages/desktop-client/src/components/reports/reports/SankeyCard.js rename to packages/desktop-client/src/components/reports/reports/SankeyCard.jsx diff --git a/packages/desktop-client/src/components/reports/spreadsheets/default-spreadsheet.tsx b/packages/desktop-client/src/components/reports/spreadsheets/default-spreadsheet.ts similarity index 100% rename from packages/desktop-client/src/components/reports/spreadsheets/default-spreadsheet.tsx rename to packages/desktop-client/src/components/reports/spreadsheets/default-spreadsheet.ts diff --git a/packages/desktop-client/src/components/reports/spreadsheets/net-worth-spreadsheet.tsx b/packages/desktop-client/src/components/reports/spreadsheets/net-worth-spreadsheet.ts similarity index 100% rename from packages/desktop-client/src/components/reports/spreadsheets/net-worth-spreadsheet.tsx rename to packages/desktop-client/src/components/reports/spreadsheets/net-worth-spreadsheet.ts diff --git a/packages/desktop-client/src/components/reports/spreadsheets/sankey-spreadsheet.tsx b/packages/desktop-client/src/components/reports/spreadsheets/sankey-spreadsheet.ts similarity index 100% rename from packages/desktop-client/src/components/reports/spreadsheets/sankey-spreadsheet.tsx rename to packages/desktop-client/src/components/reports/spreadsheets/sankey-spreadsheet.ts diff --git a/packages/desktop-client/src/components/reports/useReport.tsx b/packages/desktop-client/src/components/reports/useReport.ts similarity index 100% rename from packages/desktop-client/src/components/reports/useReport.tsx rename to packages/desktop-client/src/components/reports/useReport.ts diff --git a/packages/desktop-client/src/components/rules/SchedulesQuery.tsx b/packages/desktop-client/src/components/rules/SchedulesQuery.ts similarity index 100% rename from packages/desktop-client/src/components/rules/SchedulesQuery.tsx rename to packages/desktop-client/src/components/rules/SchedulesQuery.ts diff --git a/packages/desktop-client/src/components/schedules/EditSchedule.js b/packages/desktop-client/src/components/schedules/EditSchedule.jsx similarity index 100% rename from packages/desktop-client/src/components/schedules/EditSchedule.js rename to packages/desktop-client/src/components/schedules/EditSchedule.jsx diff --git a/packages/desktop-client/src/components/schedules/PostsOfflineNotification.js b/packages/desktop-client/src/components/schedules/PostsOfflineNotification.jsx similarity index 100% rename from packages/desktop-client/src/components/schedules/PostsOfflineNotification.js rename to packages/desktop-client/src/components/schedules/PostsOfflineNotification.jsx diff --git a/packages/desktop-client/src/components/select/RecurringSchedulePicker.js b/packages/desktop-client/src/components/select/RecurringSchedulePicker.jsx similarity index 100% rename from packages/desktop-client/src/components/select/RecurringSchedulePicker.js rename to packages/desktop-client/src/components/select/RecurringSchedulePicker.jsx diff --git a/packages/desktop-client/src/components/transactions/MobileTransaction.js b/packages/desktop-client/src/components/transactions/MobileTransaction.jsx similarity index 100% rename from packages/desktop-client/src/components/transactions/MobileTransaction.js rename to packages/desktop-client/src/components/transactions/MobileTransaction.jsx diff --git a/packages/desktop-client/src/components/transactions/SelectedTransactions.js b/packages/desktop-client/src/components/transactions/SelectedTransactions.jsx similarity index 100% rename from packages/desktop-client/src/components/transactions/SelectedTransactions.js rename to packages/desktop-client/src/components/transactions/SelectedTransactions.jsx diff --git a/packages/desktop-client/src/components/transactions/SimpleTransactionsTable.js b/packages/desktop-client/src/components/transactions/SimpleTransactionsTable.jsx similarity index 100% rename from packages/desktop-client/src/components/transactions/SimpleTransactionsTable.js rename to packages/desktop-client/src/components/transactions/SimpleTransactionsTable.jsx diff --git a/packages/desktop-client/src/components/transactions/TransactionList.js b/packages/desktop-client/src/components/transactions/TransactionList.jsx similarity index 100% rename from packages/desktop-client/src/components/transactions/TransactionList.js rename to packages/desktop-client/src/components/transactions/TransactionList.jsx diff --git a/packages/desktop-client/src/components/transactions/TransactionsTable.js b/packages/desktop-client/src/components/transactions/TransactionsTable.jsx similarity index 100% rename from packages/desktop-client/src/components/transactions/TransactionsTable.js rename to packages/desktop-client/src/components/transactions/TransactionsTable.jsx diff --git a/packages/desktop-client/src/components/transactions/TransactionsTable.test.js b/packages/desktop-client/src/components/transactions/TransactionsTable.test.jsx similarity index 100% rename from packages/desktop-client/src/components/transactions/TransactionsTable.test.js rename to packages/desktop-client/src/components/transactions/TransactionsTable.test.jsx diff --git a/packages/desktop-client/src/components/util/GenericInput.js b/packages/desktop-client/src/components/util/GenericInput.jsx similarity index 100% rename from packages/desktop-client/src/components/util/GenericInput.js rename to packages/desktop-client/src/components/util/GenericInput.jsx diff --git a/packages/desktop-client/src/util/router-tools.tsx b/packages/desktop-client/src/util/router-tools.ts similarity index 100% rename from packages/desktop-client/src/util/router-tools.tsx rename to packages/desktop-client/src/util/router-tools.ts diff --git a/packages/loot-core/src/client/data-hooks/filters.tsx b/packages/loot-core/src/client/data-hooks/filters.ts similarity index 100% rename from packages/loot-core/src/client/data-hooks/filters.tsx rename to packages/loot-core/src/client/data-hooks/filters.ts diff --git a/upcoming-release-notes/2101.md b/upcoming-release-notes/2101.md new file mode 100644 index 00000000000..d7390fbc858 --- /dev/null +++ b/upcoming-release-notes/2101.md @@ -0,0 +1,6 @@ +--- +category: Maintenance +authors: [twk3] +--- + +Apply eslint filename extensions for jsx. \ No newline at end of file