Showing 93 of 93 total issues
Function syncTransactions
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
async function syncTransactions(dispatch, agreementId, owner, start, end) {
Function agreementState
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
async function agreementState({ params: message }) {
const { config, redis, amqp, log } = this;
const { agreement: agreementId, state: action } = message;
const note = message.note || `Applying '${action}' operation to agreement`;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function performSync
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
async function performSync(ctx, { log }) {
const { agreements, txIds } = await getUpdatedTransactions(ctx);
// done - nothing to sync
if (agreements.size === 0) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function transactionSync
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function transactionSync({ params: message = {} }) {
const { config, redis } = this;
const { paypal: paypalConfig } = config;
function updateCommon(sale, owner) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function getPendingAgreements
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
async function getPendingAgreements(ctx, query, opts = {}) {
const { service, pulledUsers, missingUsers, pendingAgreements, agreementOwners } = ctx;
const offset = opts.cursor || 0;
const response = await service.dispatch('agreement.list', {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function calculateDiscounts
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function calculateDiscounts(subscription, customSetupFee, skipSetupFee, trialDiscount, trialCycle) {
const regularPayment = { ...subscription.definition.amount };
const setupFee = { ...regularPayment };
const extractCycle = skipSetupFee ? 0 : 1;
const normalizedTrialCycle = subscription.name === 'year'
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function createSaveToRedis
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function createSaveToRedis(redis, message) {
return function saveToRedis(data) {
const { plan, plans } = data;
const { meta, level, title } = message;
const aliasedId = message.alias || plan.id;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function updateRedis
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function updateRedis(sale) {
const { redis } = this;
const { state } = sale;
if (state !== 'approved') {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Parsing error: The keyword 'const' is reserved Open
const { ActionTransport } = require('@microfleet/core');
- Read upRead up
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/
Parsing error: The keyword 'const' is reserved Open
const Errors = require('common-errors');
- Read upRead up
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/
Parsing error: The keyword 'const' is reserved Open
const { ActionTransport } = require('@microfleet/core');
- Read upRead up
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/
Parsing error: The keyword 'const' is reserved Open
const { ActionTransport } = require('@microfleet/core');
- Read upRead up
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/
Parsing error: The keyword 'const' is reserved Open
const { ActionTransport } = require('@microfleet/core');
- Read upRead up
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/
Parsing error: The keyword 'const' is reserved Open
const { ActionTransport } = require('@microfleet/core');
- Read upRead up
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/
Parsing error: The keyword 'const' is reserved Open
const { ActionTransport } = require('@microfleet/core');
- Read upRead up
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/
Parsing error: The keyword 'class' is reserved Open
class PublishingError extends Error {
- Read upRead up
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/
Parsing error: The keyword 'const' is reserved Open
const { get } = require('lodash');
- Read upRead up
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/
Parsing error: The keyword 'const' is reserved Open
const { ActionTransport } = require('@microfleet/core');
- Read upRead up
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/
Parsing error: The keyword 'const' is reserved Open
const { ActionTransport } = require('@microfleet/core');
- Read upRead up
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/
Parsing error: The keyword 'const' is reserved Open
const { log, redis } = app;
- Read upRead up
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/