Fix linter errors
# Conflicts: # lib/contracts/contribution.js # lib/contracts/contributor.js # lib/contracts/proposal.js # lib/kredits.js # lib/utils/pagination.js
This commit is contained in:
@@ -9,7 +9,7 @@ const validator = require('../utils/validator');
|
||||
*/
|
||||
class Contribution {
|
||||
|
||||
constructor(attrs) {
|
||||
constructor (attrs) {
|
||||
Object.keys(attrs).forEach(a => this[a] = attrs[a]);
|
||||
}
|
||||
|
||||
@@ -26,24 +26,24 @@ class Contribution {
|
||||
kind,
|
||||
description,
|
||||
url,
|
||||
details
|
||||
details,
|
||||
} = this;
|
||||
|
||||
let data = {
|
||||
"@context": "https://schema.kosmos.org",
|
||||
"@type": "Contribution",
|
||||
"contributor": {
|
||||
"ipfs": contributorIpfsHash
|
||||
'@context': 'https://schema.kosmos.org',
|
||||
'@type': 'Contribution',
|
||||
'contributor': {
|
||||
'ipfs': contributorIpfsHash,
|
||||
},
|
||||
date,
|
||||
time,
|
||||
kind,
|
||||
description,
|
||||
"details": details || {}
|
||||
'details': details || {},
|
||||
};
|
||||
|
||||
if (url) {
|
||||
data["url"] = url;
|
||||
data['url'] = url;
|
||||
}
|
||||
|
||||
// Write it pretty to ipfs
|
||||
|
||||
@@ -12,7 +12,7 @@ class Contributor {
|
||||
* @method
|
||||
* @public
|
||||
*/
|
||||
static deserialize(serialized) {
|
||||
static deserialize (serialized) {
|
||||
let {
|
||||
name,
|
||||
kind,
|
||||
@@ -49,7 +49,7 @@ class Contributor {
|
||||
* @method
|
||||
* @public
|
||||
*/
|
||||
static serialize(deserialized) {
|
||||
static serialize (deserialized) {
|
||||
let {
|
||||
name,
|
||||
kind,
|
||||
@@ -64,7 +64,7 @@ class Contributor {
|
||||
"@type": "Contributor",
|
||||
kind,
|
||||
name,
|
||||
"accounts": []
|
||||
"accounts": [],
|
||||
};
|
||||
|
||||
if (url) {
|
||||
@@ -76,7 +76,7 @@ class Contributor {
|
||||
"site": "github.com",
|
||||
"uid": github_uid,
|
||||
"username": github_username,
|
||||
"url": `https://github.com/${github_username}`
|
||||
"url": `https://github.com/${github_username}`,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ class Contributor {
|
||||
data.accounts.push({
|
||||
"site": "wiki.kosmos.org",
|
||||
"username": wiki_username,
|
||||
"url": `https://wiki.kosmos.org/User:${wiki_username}`
|
||||
"url": `https://wiki.kosmos.org/User:${wiki_username}`,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user