Showing 570 of 1,380 total issues
Function oninit
has 84 lines of code (exceeds 25 allowed). Consider refactoring. Open
oninit: function(vnode) {
const goal = vnode.attrs.goal(),
project = vnode.attrs.project,
descriptionError = prop(false),
titleError = prop(false),
Function saveReward
has 84 lines of code (exceeds 25 allowed). Consider refactoring. Open
saveReward = () => {
isSavingReward(true);
validate();
if (vnode.attrs.error()) {
isSavingReward(false);
Function oninit
has 84 lines of code (exceeds 25 allowed). Consider refactoring. Open
oninit: function(vnode) {
const contributedProjects = h.RedrawStream();
const subscribedProjects = h.RedrawStream();
const projectReminders = h.RedrawStream();
const mailMarketingLists = h.RedrawStream();
File admin-project-detail.js
has 304 lines of code (exceeds 250 allowed). Consider refactoring. Open
import m from 'mithril';
import prop from 'mithril/stream';
import _ from 'underscore';
import {
catarse,
Function view
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
view({ state, attrs }) {
const onSend = attrs.onSend;
const onClose = attrs.onClose;
const isSending = attrs.isSending();
Function view
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
view: function({state, attrs}) {
const user = attrs.user || {},
fields = state.fields;
return m('#about-tab.content', [
- 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 23 (exceeds 5 allowed). Consider refactoring. Open
view: function({state, attrs}) {
const project = state.project();
const user = h.getUser();
const projectUser = state.projectUser();
- 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 AjaxRequestStub
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
getJasmineRequireObj().AjaxRequestStub = function() {
var RETURN = 0,
ERROR = 1,
TIMEOUT = 2;
- 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 projects-contribution-report.js
has 299 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 project-insights.js
has 297 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';
Function view
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
view: function({state, attrs}) {
const vmIsLoading = attrs.vm.isLoading;
const newSubscription = attrs.attrs;
const oldSubscription = attrs.attrs.oldSubscription;
- 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 22 (exceeds 5 allowed). Consider refactoring. Open
view: function ({ state, attrs }) {
const vm = state.vm;
return m('#basics-tab', [
state.showSuccess()
- 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 sendCreditCardPayment
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
const sendCreditCardPayment = (selectedCreditCard, fields, commonData, addVM) => {
if (!fields) {
return false;
}
File admin-contributions.js
has 293 lines of code (exceeds 250 allowed). Consider refactoring. Open
import m from 'mithril';
import prop from 'mithril/stream';
import h from '../h';
import models from '../models';
import { catarse } from '../api';
File surveys.js
has 293 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 moment from 'moment';
Function oninit
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
oninit: function(vnode) {
const user_id = vnode.attrs.userId,
userCommonId = vnode.attrs.user && vnode.attrs.user.common_id,
subscriptions = getUserPrivateSubscriptionsListVM(userCommonId),
onlinePages = contributionVM.getUserContributionsListWithFilter(),
File user-info-edit-settings.tsx
has 291 lines of code (exceeds 250 allowed). Consider refactoring. Open
import m from 'mithril';
import prop from 'mithril/stream';
import _ from 'underscore';
import { StreamType } from '../../../@types/reward-details-stream';
import { UserDetails } from '../../../@types/user-details';
Function view
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
view({ state, attrs }) {
const project_id = attrs.project_id;
const user_id = attrs.user_id;
const error = state.error;
const errors = state.errors;
File user-subscription-box.js
has 290 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 moment from 'moment';
Function hasError
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
hasError: (field : string) => {
switch(field) {
case 'address_zip_code': {
errors.addressZipCode(hasErrorOn(field))
break;