Skip to content

Commit a688977

Browse files
nventuroLeo Arias
authored and
Leo Arias
committed
Dangling commas are now required. (OpenZeppelin#1359)
1 parent 1a4e534 commit a688977

10 files changed

+26
-26
lines changed

.eslintrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
// Code style
2727
"camelcase": ["error", {"properties": "always"}],
28-
"comma-dangle": ["warn", "always-multiline"],
28+
"comma-dangle": ["error", "always-multiline"],
2929
"comma-spacing": ["error", {"before": false, "after": true}],
3030
"dot-notation": ["error", {"allowKeywords": true, "allowPattern": ""}],
3131
"eol-last": ["error", "always"],

test/crowdsale/AllowanceCrowdsale.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ contract('AllowanceCrowdsale', function ([_, investor, wallet, purchaser, tokenW
4646
purchaser: investor,
4747
beneficiary: investor,
4848
value: value,
49-
amount: expectedTokenAmount
49+
amount: expectedTokenAmount,
5050
});
5151
});
5252

test/crowdsale/Crowdsale.test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ contract('Crowdsale', function ([_, investor, wallet, purchaser]) {
8787
purchaser: investor,
8888
beneficiary: investor,
8989
value: value,
90-
amount: expectedTokenAmount
90+
amount: expectedTokenAmount,
9191
});
9292
});
9393

@@ -111,7 +111,7 @@ contract('Crowdsale', function ([_, investor, wallet, purchaser]) {
111111
purchaser: purchaser,
112112
beneficiary: investor,
113113
value: value,
114-
amount: expectedTokenAmount
114+
amount: expectedTokenAmount,
115115
});
116116
});
117117

test/crowdsale/MintedCrowdsale.behavior.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ function shouldBehaveLikeMintedCrowdsale ([_, investor, wallet, purchaser], rate
2525
purchaser: investor,
2626
beneficiary: investor,
2727
value: value,
28-
amount: expectedTokenAmount
28+
amount: expectedTokenAmount,
2929
});
3030
});
3131

test/payment/Escrow.behavior.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ function shouldBehaveLikeEscrow (primary, [payee1, payee2]) {
3434
const { logs } = await this.escrow.deposit(payee1, { from: primary, value: amount });
3535
expectEvent.inLogs(logs, 'Deposited', {
3636
payee: payee1,
37-
weiAmount: amount
37+
weiAmount: amount,
3838
});
3939
});
4040

@@ -87,7 +87,7 @@ function shouldBehaveLikeEscrow (primary, [payee1, payee2]) {
8787
const { logs } = await this.escrow.withdraw(payee1, { from: primary });
8888
expectEvent.inLogs(logs, 'Withdrawn', {
8989
payee: payee1,
90-
weiAmount: amount
90+
weiAmount: amount,
9191
});
9292
});
9393
});

test/token/ERC20/ERC20.test.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ contract('ERC20', function ([_, owner, recipient, anotherAccount]) {
6565
expectEvent.inLogs(logs, 'Transfer', {
6666
from: owner,
6767
to: to,
68-
value: amount
68+
value: amount,
6969
});
7070
});
7171
});
@@ -93,7 +93,7 @@ contract('ERC20', function ([_, owner, recipient, anotherAccount]) {
9393
expectEvent.inLogs(logs, 'Approval', {
9494
owner: owner,
9595
spender: spender,
96-
value: amount
96+
value: amount,
9797
});
9898
});
9999

@@ -127,7 +127,7 @@ contract('ERC20', function ([_, owner, recipient, anotherAccount]) {
127127
expectEvent.inLogs(logs, 'Approval', {
128128
owner: owner,
129129
spender: spender,
130-
value: amount
130+
value: amount,
131131
});
132132
});
133133

@@ -197,7 +197,7 @@ contract('ERC20', function ([_, owner, recipient, anotherAccount]) {
197197
expectEvent.inLogs(logs, 'Transfer', {
198198
from: owner,
199199
to: to,
200-
value: amount
200+
value: amount,
201201
});
202202
});
203203
});
@@ -272,7 +272,7 @@ contract('ERC20', function ([_, owner, recipient, anotherAccount]) {
272272
expectEvent.inLogs(logs, 'Approval', {
273273
owner: owner,
274274
spender: spender,
275-
value: 0
275+
value: 0,
276276
});
277277
});
278278

@@ -329,7 +329,7 @@ contract('ERC20', function ([_, owner, recipient, anotherAccount]) {
329329
expectEvent.inLogs(logs, 'Approval', {
330330
owner: owner,
331331
spender: spender,
332-
value: amount
332+
value: amount,
333333
});
334334
});
335335

@@ -363,7 +363,7 @@ contract('ERC20', function ([_, owner, recipient, anotherAccount]) {
363363
expectEvent.inLogs(logs, 'Approval', {
364364
owner: owner,
365365
spender: spender,
366-
value: amount
366+
value: amount,
367367
});
368368
});
369369

test/token/ERC20/behaviors/ERC20Burnable.behavior.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ function shouldBehaveLikeERC20Burnable (owner, initialBalance, [burner]) {
3232
expectEvent.inLogs(this.logs, 'Transfer', {
3333
from: owner,
3434
to: ZERO_ADDRESS,
35-
value: amount
35+
value: amount,
3636
});
3737
});
3838
}
@@ -78,7 +78,7 @@ function shouldBehaveLikeERC20Burnable (owner, initialBalance, [burner]) {
7878
expectEvent.inLogs(this.logs, 'Transfer', {
7979
from: owner,
8080
to: ZERO_ADDRESS,
81-
value: amount
81+
value: amount,
8282
});
8383
});
8484
}

test/token/ERC20/behaviors/ERC20Mintable.behavior.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ function shouldBehaveLikeERC20Mintable (minter, [anyone]) {
3838
expectEvent.inLogs(this.logs, 'Transfer', {
3939
from: ZERO_ADDRESS,
4040
to: anyone,
41-
value: amount
41+
value: amount,
4242
});
4343
});
4444
}

test/token/ERC721/ERC721.behavior.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -92,15 +92,15 @@ function shouldBehaveLikeERC721 (
9292
expectEvent.inLogs(logs, 'Transfer', {
9393
from: owner,
9494
to: this.toWhom,
95-
tokenId: tokenId
95+
tokenId: tokenId,
9696
});
9797
});
9898
} else {
9999
it('emits only a transfer event', async function () {
100100
expectEvent.inLogs(logs, 'Transfer', {
101101
from: owner,
102102
to: this.toWhom,
103-
tokenId: tokenId
103+
tokenId: tokenId,
104104
});
105105
});
106106
}
@@ -165,7 +165,7 @@ function shouldBehaveLikeERC721 (
165165
expectEvent.inLogs(logs, 'Transfer', {
166166
from: owner,
167167
to: owner,
168-
tokenId: tokenId
168+
tokenId: tokenId,
169169
});
170170
});
171171

@@ -341,7 +341,7 @@ function shouldBehaveLikeERC721 (
341341
expectEvent.inLogs(logs, 'Approval', {
342342
owner: owner,
343343
approved: address,
344-
tokenId: tokenId
344+
tokenId: tokenId,
345345
});
346346
});
347347
};
@@ -451,7 +451,7 @@ function shouldBehaveLikeERC721 (
451451
expectEvent.inLogs(logs, 'ApprovalForAll', {
452452
owner: owner,
453453
operator: operator,
454-
approved: true
454+
approved: true,
455455
});
456456
});
457457
});
@@ -473,7 +473,7 @@ function shouldBehaveLikeERC721 (
473473
expectEvent.inLogs(logs, 'ApprovalForAll', {
474474
owner: owner,
475475
operator: operator,
476-
approved: true
476+
approved: true,
477477
});
478478
});
479479

@@ -501,7 +501,7 @@ function shouldBehaveLikeERC721 (
501501
expectEvent.inLogs(logs, 'ApprovalForAll', {
502502
owner: owner,
503503
operator: operator,
504-
approved: true
504+
approved: true,
505505
});
506506
});
507507
});

test/token/ERC721/ERC721MintBurn.behavior.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ function shouldBehaveLikeMintAndBurnERC721 (
4545
expectEvent.inLogs(logs, 'Transfer', {
4646
from: ZERO_ADDRESS,
4747
to: newOwner,
48-
tokenId: thirdTokenId
48+
tokenId: thirdTokenId,
4949
});
5050
});
5151
});
@@ -90,7 +90,7 @@ function shouldBehaveLikeMintAndBurnERC721 (
9090
expectEvent.inLogs(logs, 'Transfer', {
9191
from: owner,
9292
to: ZERO_ADDRESS,
93-
tokenId: tokenId
93+
tokenId: tokenId,
9494
});
9595
});
9696
});

0 commit comments

Comments
 (0)