Skip to content

Commit ac4edb1

Browse files
committed
apply lint & prettier
1 parent 372fde8 commit ac4edb1

File tree

7 files changed

+22
-23
lines changed

7 files changed

+22
-23
lines changed

.eslintrc.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ module.exports = {
1616
"error",
1717
{ ignores: ["modules"] },
1818
],
19+
"node/no-unpublished-import": "warn",
20+
"node/no-missing-import": "warn",
1921
},
2022
settings: {
2123
node: { tryExtensions: [".js", ".json", ".node", ".ts", ".d.ts"] },

contracts/Government.sol

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,9 @@ contract Government is IGovernment {
2020
return false;
2121
}
2222

23-
function numberOfVotes(address _candidateAddress)
24-
external
25-
view
26-
returns (uint256)
27-
{
23+
function numberOfVotes(
24+
address _candidateAddress
25+
) external view returns (uint256) {
2826
console.log(_candidateAddress);
2927
// finish the function
3028
return 0;

contracts/Medical.sol

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ contract Medical is IMedical {
1717
_bloodTypeStore = _bloodType;
1818
}
1919

20-
function getMedicalData(address _patientAddress)
20+
function getMedicalData(
21+
address _patientAddress
22+
)
2123
external
2224
view
2325
returns (

contracts/SocialNetwork.sol

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,12 @@ contract SocialNetwork is ISocialNetwork {
1818
return _id;
1919
}
2020

21-
function getPost(uint256 _postId)
21+
function getPost(
22+
uint256 _postId
23+
)
2224
external
2325
view
24-
returns (
25-
string memory message,
26-
uint256 totalLikes,
27-
uint256 time
28-
)
26+
returns (string memory message, uint256 totalLikes, uint256 time)
2927
{
3028
console.log(_postId);
3129
return (_messageStore, 0, 0);

contracts/interfaces/IGovernment.sol

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,9 @@ interface IGovernment {
1010
function isCandidate(address _verifyAddress) external view returns (bool);
1111

1212
// Returns the number of votes for the candidate passed in the argument.
13-
function numberOfVotes(address _candidateAddress)
14-
external
15-
view
16-
returns (uint256);
13+
function numberOfVotes(
14+
address _candidateAddress
15+
) external view returns (uint256);
1716

1817
// A citizen can vote to candidate.
1918
// ATTENTION: Revert transaction if the caller have already voted or abstained.

contracts/interfaces/IMedical.sol

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ interface IMedical {
88
function register(string memory _name, string memory _bloodType) external;
99

1010
// Returns the patient's medical data.
11-
function getMedicalData(address _patientAddress)
11+
function getMedicalData(
12+
address _patientAddress
13+
)
1214
external
1315
view
1416
returns (

contracts/interfaces/ISocialNetwork.sol

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,12 @@ interface ISocialNetwork {
1111
function getLastPostId() external view returns (uint256);
1212

1313
// Returns the data of the post by its id.
14-
function getPost(uint256 _postId)
14+
function getPost(
15+
uint256 _postId
16+
)
1517
external
1618
view
17-
returns (
18-
string memory message,
19-
uint256 totalLikes,
20-
uint256 time
21-
);
19+
returns (string memory message, uint256 totalLikes, uint256 time);
2220

2321
// Like a post by its id.
2422
function like(uint256 _postId) external;

0 commit comments

Comments
 (0)