From 1da4bd263866a37c4cf3797791e0ba028f6b3473 Mon Sep 17 00:00:00 2001 From: William Brawner Date: Tue, 24 Mar 2020 18:18:14 -0700 Subject: [PATCH] Fix lint errors/warnings Signed-off-by: William Brawner --- src/components/ProgressBar.vue | 10 ++++- src/components/budget/BudgetForm.vue | 9 ++-- src/components/category/CategoryForm.vue | 5 ++- src/components/category/CategoryList.vue | 24 ++++++++--- .../transaction/TransactionForm.vue | 42 ++++++++++++------- .../transaction/TransactionList.vue | 15 +++++-- src/store/index.js | 6 +-- 7 files changed, 79 insertions(+), 32 deletions(-) diff --git a/src/components/ProgressBar.vue b/src/components/ProgressBar.vue index f682429..f37d66b 100644 --- a/src/components/ProgressBar.vue +++ b/src/components/ProgressBar.vue @@ -7,8 +7,14 @@ export default { name: 'ProgressBar', props: { - value: Number, - max: Number, + value: { + type: Number, + default: 0, + }, + max: { + type: Number, + default: 0, + }, invertColors: Boolean, }, computed: { diff --git a/src/components/budget/BudgetForm.vue b/src/components/budget/BudgetForm.vue index db06c37..d2f52ca 100644 --- a/src/components/budget/BudgetForm.vue +++ b/src/components/budget/BudgetForm.vue @@ -39,7 +39,10 @@ export default { components: { }, props: { - budget: {}, + budget: { + default: {}, + type: () => {}, + }, }, data: function() { return { @@ -56,8 +59,8 @@ export default { this.user = undefined this.budget.users = this.budget.users.filter(u => u.user !== user) this.budget.users.push({ - 'user': user, - 'permission': 2, + user: user, + permission: 2, }) }, saveBudget() { diff --git a/src/components/category/CategoryForm.vue b/src/components/category/CategoryForm.vue index 2548f8e..6a4e06c 100644 --- a/src/components/category/CategoryForm.vue +++ b/src/components/category/CategoryForm.vue @@ -45,7 +45,10 @@ export default { components: { }, props: { - category: Object, + category: { + default: () => {}, + type: Object, + }, }, data: function() { return { diff --git a/src/components/category/CategoryList.vue b/src/components/category/CategoryList.vue index baa4e7b..cbb3b97 100644 --- a/src/components/category/CategoryList.vue +++ b/src/components/category/CategoryList.vue @@ -4,8 +4,17 @@

{{ category.name }}

-

{{ category.expense ? 'Remaining' : 'Pending' }}: {{ (categoryRemainingBalance(category) / 100).toLocaleString(undefined, {style: 'currency', currency: 'USD'}) }}

+

+ {{ category.expense ? "Remaining" : "Pending" }}: + {{ + ( + categoryRemainingBalance(category) / 100 + ).toLocaleString(undefined, { + style: "currency", + currency: "USD" + }) + }} +

diff --git a/src/components/transaction/TransactionForm.vue b/src/components/transaction/TransactionForm.vue index b9513c2..07e138b 100644 --- a/src/components/transaction/TransactionForm.vue +++ b/src/components/transaction/TransactionForm.vue @@ -1,24 +1,31 @@