Skip to content

Commit 5d9d5cf

Browse files
committed
Update eslint rule arrow-parens to always
1 parent 5427734 commit 5d9d5cf

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

.eslintrc.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@
212212
],
213213
"arrow-parens": [
214214
"error",
215-
"as-needed"
215+
"always"
216216
],
217217
"arrow-body-style": [
218218
"error",

JavaScript/4-operations.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ class BankAccount {
1919
BankAccount.collection = new Map();
2020

2121
const operations = {
22-
Withdraw: command => {
22+
Withdraw: (command) => {
2323
const account = BankAccount.collection.get(command.account);
2424
account.balance -= command.amount;
2525
},
26-
Income: command => {
26+
Income: (command) => {
2727
const account = BankAccount.collection.get(command.account);
2828
account.balance += command.amount;
2929
},
30-
Allowed: command => {
30+
Allowed: (command) => {
3131
if (command.operation === 'Income') return true;
3232
const account = BankAccount.collection.get(command.account);
3333
return account.balance >= command.amount;

JavaScript/5-undo.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -24,21 +24,21 @@ BankAccount.collection = new Map();
2424

2525
const operations = {
2626
Withdraw: {
27-
execute: command => {
27+
execute: (command) => {
2828
const account = BankAccount.find(command.account);
2929
account.balance -= command.amount;
3030
},
31-
undo: command => {
31+
undo: (command) => {
3232
const account = BankAccount.find(command.account);
3333
account.balance += command.amount;
3434
},
3535
},
3636
Income: {
37-
execute: command => {
37+
execute: (command) => {
3838
const account = BankAccount.find(command.account);
3939
account.balance += command.amount;
4040
},
41-
undo: command => {
41+
undo: (command) => {
4242
const account = BankAccount.find(command.account);
4343
account.balance -= command.amount;
4444
},

0 commit comments

Comments
 (0)