Skip to content

Commit

Permalink
apply lint & prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
neila committed Jan 22, 2024
1 parent 372fde8 commit ac4edb1
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 23 deletions.
2 changes: 2 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ module.exports = {
"error",
{ ignores: ["modules"] },
],
"node/no-unpublished-import": "warn",
"node/no-missing-import": "warn",
},
settings: {
node: { tryExtensions: [".js", ".json", ".node", ".ts", ".d.ts"] },
Expand Down
8 changes: 3 additions & 5 deletions contracts/Government.sol
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,9 @@ contract Government is IGovernment {
return false;
}

function numberOfVotes(address _candidateAddress)
external
view
returns (uint256)
{
function numberOfVotes(
address _candidateAddress
) external view returns (uint256) {
console.log(_candidateAddress);
// finish the function
return 0;
Expand Down
4 changes: 3 additions & 1 deletion contracts/Medical.sol
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ contract Medical is IMedical {
_bloodTypeStore = _bloodType;
}

function getMedicalData(address _patientAddress)
function getMedicalData(
address _patientAddress
)
external
view
returns (
Expand Down
10 changes: 4 additions & 6 deletions contracts/SocialNetwork.sol
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,12 @@ contract SocialNetwork is ISocialNetwork {
return _id;
}

function getPost(uint256 _postId)
function getPost(
uint256 _postId
)
external
view
returns (
string memory message,
uint256 totalLikes,
uint256 time
)
returns (string memory message, uint256 totalLikes, uint256 time)
{
console.log(_postId);
return (_messageStore, 0, 0);
Expand Down
7 changes: 3 additions & 4 deletions contracts/interfaces/IGovernment.sol
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@ interface IGovernment {
function isCandidate(address _verifyAddress) external view returns (bool);

// Returns the number of votes for the candidate passed in the argument.
function numberOfVotes(address _candidateAddress)
external
view
returns (uint256);
function numberOfVotes(
address _candidateAddress
) external view returns (uint256);

// A citizen can vote to candidate.
// ATTENTION: Revert transaction if the caller have already voted or abstained.
Expand Down
4 changes: 3 additions & 1 deletion contracts/interfaces/IMedical.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ interface IMedical {
function register(string memory _name, string memory _bloodType) external;

// Returns the patient's medical data.
function getMedicalData(address _patientAddress)
function getMedicalData(
address _patientAddress
)
external
view
returns (
Expand Down
10 changes: 4 additions & 6 deletions contracts/interfaces/ISocialNetwork.sol
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,12 @@ interface ISocialNetwork {
function getLastPostId() external view returns (uint256);

// Returns the data of the post by its id.
function getPost(uint256 _postId)
function getPost(
uint256 _postId
)
external
view
returns (
string memory message,
uint256 totalLikes,
uint256 time
);
returns (string memory message, uint256 totalLikes, uint256 time);

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

0 comments on commit ac4edb1

Please sign in to comment.