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