Showing 570 of 1,380 total issues
Function view
has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring. Open
view: function({state}) {
const user = state.user(),
survey = state.survey(),
countryName = state.countryName,
stateName = state.stateName,
- 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 view
has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring. Open
view: function({
state,
attrs
}) {
const newFee = {
- 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 oninit
has a Cognitive Complexity of 43 (exceeds 5 allowed). Consider refactoring. Open
oninit: function(vnode) {
let deleteFormSubmit;
const showPreview = prop(false),
willSelectRewards = prop(false),
isProjectLoaded = prop(false),
- 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 oninit
has 163 lines of code (exceeds 25 allowed). Consider refactoring. Open
oninit: function(vnode) {
const subscription = vnode.attrs.subscription,
displayModal = h.toggleProp(false, true),
displayCancelModal = h.toggleProp(false, true),
displayPaymentHistoryModal = h.toggleProp(false, true),
File projects-subscription-checkout.js
has 437 lines of code (exceeds 250 allowed). Consider refactoring. Open
import m from 'mithril';
import prop from 'mithril/stream';
import _ from 'underscore';
import moment from 'moment';
import { catarse } from '../api';
File projects-explore-vm.ts
has 432 lines of code (exceeds 250 allowed). Consider refactoring. Open
type ExtendedWindow = {
replaceDiacritics(inputText : string): string;
}
import _ from 'underscore'
Function oninit
has 158 lines of code (exceeds 25 allowed). Consider refactoring. Open
oninit: function(vnode) {
const listVM = projectListVM,
filterVM = projectFilterVM,
categories = prop([]),
filters = catarse.filtersVM,
File surveys-show.js
has 428 lines of code (exceeds 250 allowed). Consider refactoring. Open
import m from 'mithril';
import prop from 'mithril/stream';
import _ from 'underscore';
import { catarse } from '../api';
import models from '../models';
File dashboard-reward-card.js
has 425 lines of code (exceeds 250 allowed). Consider refactoring. Open
import m from 'mithril';
import prop from 'mithril/stream';
import _ from 'underscore';
import h from '../h';
import copyTextInput from './copy-text-input';
File projects-payment.js
has 424 lines of code (exceeds 250 allowed). Consider refactoring. Open
import m from 'mithril';
import prop from 'mithril/stream';
import _ from 'underscore';
import h from '../h';
import contributionVM from '../vms/contribution-vm';
Function matcherFn_
has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring. Open
jasmine.Matchers.matcherFn_ = function(matcherName, matcherFunction) {
return function() {
var matcherArgs = jasmine.util.argsToArray(arguments);
var result = matcherFunction.apply(this, arguments);
- 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 oninit
has 152 lines of code (exceeds 25 allowed). Consider refactoring. Open
oninit: function (vnode) {
const reward = vnode.attrs.reward(),
imageFileToUpload = prop(null),
isUploadingRewardImage = prop(false),
isDeletingRewardImage = prop(false),
Function view
has 150 lines of code (exceeds 25 allowed). Consider refactoring. Open
view({ attrs, state }: m.Vnode<DescriptionEditAttrs, DescriptionEditState>) {
const project = attrs.project
const isSaving = attrs.isSaving
const save = attrs.save
Function view
has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring. Open
view: function({state}) {
const contribution = state.contribution,
contactModalC = [ownerMessageContent, {
id: contribution.project_user_id,
name: contribution.project_owner_name,
- 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 oninit
has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring. Open
oninit: function(vnode) {
const project = projectVM.getCurrentProject(),
reward = vnode.attrs.reward(),
imageFileToUpload = prop(null),
minimumValue = projectVM.isSubscription(project) ? 5 : 10,
- 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
File posts.js
has 412 lines of code (exceeds 250 allowed). Consider refactoring. Open
import m from 'mithril';
import prop from 'mithril/stream';
import { catarse } from '../api';
import _ from 'underscore';
import h from '../h';
File user-billing.js
has 409 lines of code (exceeds 250 allowed). Consider refactoring. Open
import m from 'mithril';
import prop from 'mithril/stream';
import _ from 'underscore';
import { catarse } from '../api';
import models from '../models';
Function wrap
has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring. Open
export function wrap(component, customAttr) {
if (!app) {
app = document.getElementById('application');
}
- 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 oninit
has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring. Open
oninit: function(vnode) {
const MINIMUM_VALUE = 10;
const queryRewardValue = h.getParams('value');
const setInput = localVnode => localVnode.dom.focus();
const isSelected = currentReward => (currentReward.id == null && !rewardVM.selectedReward() && queryRewardValue) || (rewardVM.selectedReward() && currentReward.id === rewardVM.selectedReward().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 oninit
has 142 lines of code (exceeds 25 allowed). Consider refactoring. Open
oninit: function(vnode) {
models.bank.pageSize(false);
const user = vnode.attrs.user,
bankAccount = prop({}),
fields = {