Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dangling commas are now required. #1359

Merged
merged 1 commit into from
Sep 29, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

// Code style
"camelcase": ["error", {"properties": "always"}],
"comma-dangle": ["warn", "always-multiline"],
"comma-dangle": ["error", "always-multiline"],
"comma-spacing": ["error", {"before": false, "after": true}],
"dot-notation": ["error", {"allowKeywords": true, "allowPattern": ""}],
"eol-last": ["error", "always"],
Expand Down
2 changes: 1 addition & 1 deletion test/crowdsale/AllowanceCrowdsale.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ contract('AllowanceCrowdsale', function ([_, investor, wallet, purchaser, tokenW
purchaser: investor,
beneficiary: investor,
value: value,
amount: expectedTokenAmount
amount: expectedTokenAmount,
});
});

Expand Down
4 changes: 2 additions & 2 deletions test/crowdsale/Crowdsale.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ contract('Crowdsale', function ([_, investor, wallet, purchaser]) {
purchaser: investor,
beneficiary: investor,
value: value,
amount: expectedTokenAmount
amount: expectedTokenAmount,
});
});

Expand All @@ -111,7 +111,7 @@ contract('Crowdsale', function ([_, investor, wallet, purchaser]) {
purchaser: purchaser,
beneficiary: investor,
value: value,
amount: expectedTokenAmount
amount: expectedTokenAmount,
});
});

Expand Down
2 changes: 1 addition & 1 deletion test/crowdsale/MintedCrowdsale.behavior.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function shouldBehaveLikeMintedCrowdsale ([_, investor, wallet, purchaser], rate
purchaser: investor,
beneficiary: investor,
value: value,
amount: expectedTokenAmount
amount: expectedTokenAmount,
});
});

Expand Down
4 changes: 2 additions & 2 deletions test/payment/Escrow.behavior.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function shouldBehaveLikeEscrow (primary, [payee1, payee2]) {
const { logs } = await this.escrow.deposit(payee1, { from: primary, value: amount });
expectEvent.inLogs(logs, 'Deposited', {
payee: payee1,
weiAmount: amount
weiAmount: amount,
});
});

Expand Down Expand Up @@ -87,7 +87,7 @@ function shouldBehaveLikeEscrow (primary, [payee1, payee2]) {
const { logs } = await this.escrow.withdraw(payee1, { from: primary });
expectEvent.inLogs(logs, 'Withdrawn', {
payee: payee1,
weiAmount: amount
weiAmount: amount,
});
});
});
Expand Down
14 changes: 7 additions & 7 deletions test/token/ERC20/ERC20.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ contract('ERC20', function ([_, owner, recipient, anotherAccount]) {
expectEvent.inLogs(logs, 'Transfer', {
from: owner,
to: to,
value: amount
value: amount,
});
});
});
Expand Down Expand Up @@ -93,7 +93,7 @@ contract('ERC20', function ([_, owner, recipient, anotherAccount]) {
expectEvent.inLogs(logs, 'Approval', {
owner: owner,
spender: spender,
value: amount
value: amount,
});
});

Expand Down Expand Up @@ -127,7 +127,7 @@ contract('ERC20', function ([_, owner, recipient, anotherAccount]) {
expectEvent.inLogs(logs, 'Approval', {
owner: owner,
spender: spender,
value: amount
value: amount,
});
});

Expand Down Expand Up @@ -197,7 +197,7 @@ contract('ERC20', function ([_, owner, recipient, anotherAccount]) {
expectEvent.inLogs(logs, 'Transfer', {
from: owner,
to: to,
value: amount
value: amount,
});
});
});
Expand Down Expand Up @@ -272,7 +272,7 @@ contract('ERC20', function ([_, owner, recipient, anotherAccount]) {
expectEvent.inLogs(logs, 'Approval', {
owner: owner,
spender: spender,
value: 0
value: 0,
});
});

Expand Down Expand Up @@ -329,7 +329,7 @@ contract('ERC20', function ([_, owner, recipient, anotherAccount]) {
expectEvent.inLogs(logs, 'Approval', {
owner: owner,
spender: spender,
value: amount
value: amount,
});
});

Expand Down Expand Up @@ -363,7 +363,7 @@ contract('ERC20', function ([_, owner, recipient, anotherAccount]) {
expectEvent.inLogs(logs, 'Approval', {
owner: owner,
spender: spender,
value: amount
value: amount,
});
});

Expand Down
4 changes: 2 additions & 2 deletions test/token/ERC20/behaviors/ERC20Burnable.behavior.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function shouldBehaveLikeERC20Burnable (owner, initialBalance, [burner]) {
expectEvent.inLogs(this.logs, 'Transfer', {
from: owner,
to: ZERO_ADDRESS,
value: amount
value: amount,
});
});
}
Expand Down Expand Up @@ -78,7 +78,7 @@ function shouldBehaveLikeERC20Burnable (owner, initialBalance, [burner]) {
expectEvent.inLogs(this.logs, 'Transfer', {
from: owner,
to: ZERO_ADDRESS,
value: amount
value: amount,
});
});
}
Expand Down
2 changes: 1 addition & 1 deletion test/token/ERC20/behaviors/ERC20Mintable.behavior.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function shouldBehaveLikeERC20Mintable (minter, [anyone]) {
expectEvent.inLogs(this.logs, 'Transfer', {
from: ZERO_ADDRESS,
to: anyone,
value: amount
value: amount,
});
});
}
Expand Down
14 changes: 7 additions & 7 deletions test/token/ERC721/ERC721.behavior.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,15 @@ function shouldBehaveLikeERC721 (
expectEvent.inLogs(logs, 'Transfer', {
from: owner,
to: this.toWhom,
tokenId: tokenId
tokenId: tokenId,
});
});
} else {
it('emits only a transfer event', async function () {
expectEvent.inLogs(logs, 'Transfer', {
from: owner,
to: this.toWhom,
tokenId: tokenId
tokenId: tokenId,
});
});
}
Expand Down Expand Up @@ -165,7 +165,7 @@ function shouldBehaveLikeERC721 (
expectEvent.inLogs(logs, 'Transfer', {
from: owner,
to: owner,
tokenId: tokenId
tokenId: tokenId,
});
});

Expand Down Expand Up @@ -341,7 +341,7 @@ function shouldBehaveLikeERC721 (
expectEvent.inLogs(logs, 'Approval', {
owner: owner,
approved: address,
tokenId: tokenId
tokenId: tokenId,
});
});
};
Expand Down Expand Up @@ -451,7 +451,7 @@ function shouldBehaveLikeERC721 (
expectEvent.inLogs(logs, 'ApprovalForAll', {
owner: owner,
operator: operator,
approved: true
approved: true,
});
});
});
Expand All @@ -473,7 +473,7 @@ function shouldBehaveLikeERC721 (
expectEvent.inLogs(logs, 'ApprovalForAll', {
owner: owner,
operator: operator,
approved: true
approved: true,
});
});

Expand Down Expand Up @@ -501,7 +501,7 @@ function shouldBehaveLikeERC721 (
expectEvent.inLogs(logs, 'ApprovalForAll', {
owner: owner,
operator: operator,
approved: true
approved: true,
});
});
});
Expand Down
4 changes: 2 additions & 2 deletions test/token/ERC721/ERC721MintBurn.behavior.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function shouldBehaveLikeMintAndBurnERC721 (
expectEvent.inLogs(logs, 'Transfer', {
from: ZERO_ADDRESS,
to: newOwner,
tokenId: thirdTokenId
tokenId: thirdTokenId,
});
});
});
Expand Down Expand Up @@ -90,7 +90,7 @@ function shouldBehaveLikeMintAndBurnERC721 (
expectEvent.inLogs(logs, 'Transfer', {
from: owner,
to: ZERO_ADDRESS,
tokenId: tokenId
tokenId: tokenId,
});
});
});
Expand Down