update eslintrc
fix errors
This commit is contained in:
parent
ed37996d68
commit
70c3999af1
6 changed files with 14 additions and 17 deletions
17
.eslintrc
17
.eslintrc
|
@ -12,16 +12,13 @@
|
|||
"rules": {
|
||||
"no-multi-spaces": 0,
|
||||
"new-cap": 0,
|
||||
"prefer-promise-reject-errors":0,
|
||||
"comma-dangle": [
|
||||
"error",
|
||||
"always-multiline"
|
||||
],
|
||||
"semi": [
|
||||
"error",
|
||||
"always",
|
||||
{ "omitLastInOneLineBlock": true }
|
||||
],
|
||||
"prefer-promise-reject-errors": 0,
|
||||
"no-unused-vars": 0,
|
||||
"standard/object-curly-even-spacing": 0,
|
||||
"handle-callback-err": 0,
|
||||
"one-var": 0,
|
||||
"comma-dangle": ["error", "always-multiline"],
|
||||
"semi": ["error", "always", { "omitLastInOneLineBlock": true }],
|
||||
"key-spacing": [
|
||||
"error",
|
||||
{
|
||||
|
|
|
@ -30,8 +30,8 @@ function * parseAndUpdateIdentifierAndClaim (modifier, claim) {
|
|||
}
|
||||
|
||||
function * parseAndUpdateClaimOnly (claim) {
|
||||
if (/^special\:/.test(claim) === true) {
|
||||
const assetName = /special\:(.*)/.exec(claim)[1];
|
||||
if (/^special:/.test(claim) === true) {
|
||||
const assetName = /special:(.*)/.exec(claim)[1];
|
||||
return yield call(newSpecialAssetRequest, onNewSpecialAssetRequest(assetName));
|
||||
} else {
|
||||
// this could be a request for an asset or a channel page
|
||||
|
|
|
@ -7,7 +7,7 @@ const claimAvailability = async (name) => {
|
|||
const claimAddresses = additionalClaimAddresses || [];
|
||||
claimAddresses.push(primaryClaimAddress);
|
||||
// find any records where the name is used
|
||||
return await chainquery.claim
|
||||
return chainquery.claim
|
||||
.findAll({
|
||||
attributes: ['claim_address'],
|
||||
where : {
|
||||
|
|
|
@ -24,7 +24,7 @@ const getClaimIdByChannel = async (channelName, channelClaimId, claimName) => {
|
|||
const getClaimId = async (channelName, channelClaimId, name, claimId) => {
|
||||
logger.debug(`getClaimId: ${channelName}, ${channelClaimId}, ${name}, ${claimId})`);
|
||||
if (channelName) {
|
||||
return await getClaimIdByChannel(channelName, channelClaimId, name);
|
||||
return getClaimIdByChannel(channelName, channelClaimId, name);
|
||||
} else {
|
||||
let claimIdResult = await chainquery.claim.queries.getLongClaimId(name, claimId);
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ function logMetricsMiddleware (req, res, next) {
|
|||
referrer = /(.*?)#.*/.exec(referrer)[1];
|
||||
} catch (e) {
|
||||
// Cheap forced string conversion & clamp
|
||||
referrer = new String(referrer);
|
||||
referrer = String(referrer);
|
||||
referrer = referrer.substr(0, 255);
|
||||
}
|
||||
|
||||
|
@ -27,7 +27,7 @@ function logMetricsMiddleware (req, res, next) {
|
|||
|
||||
db.Metrics.create({
|
||||
time : Date.now(),
|
||||
isInternal: /node\-fetch/.test(userAgent),
|
||||
isInternal: /node-fetch/.test(userAgent),
|
||||
isChannel : res.isChannel,
|
||||
claimId : res.claimId,
|
||||
routePath : httpContext.get('routePath'),
|
||||
|
|
|
@ -67,7 +67,7 @@ module.exports = (sequelize, { BOOLEAN, DATE, FLOAT, INTEGER, STRING }) => {
|
|||
const whereString = `isChannel = false and time > '${sqlTime}'`;
|
||||
const query = `SELECT ${selectString} FROM Trending WHERE ${whereString} ORDER BY weight DESC LIMIT ${limit}`;
|
||||
|
||||
return await sequelize.query(query, { type: sequelize.QueryTypes.SELECT });
|
||||
return sequelize.query(query, { type: sequelize.QueryTypes.SELECT });
|
||||
};
|
||||
|
||||
Trending.getTrendingClaims = async () => {
|
||||
|
|
Loading…
Reference in a new issue