Showing 570 of 1,380 total issues
Function oninit
has 100 lines of code (exceeds 25 allowed). Consider refactoring. Open
oninit: function (vnode) {
const {
ViewContentEvent,
AddToCartEvent
Function oninit
has 100 lines of code (exceeds 25 allowed). Consider refactoring. Open
oninit: function(vnode) {
const filtersVM = vnode.attrs.filtersVM,
displayModal = h.toggleProp(false, true),
contributionsPerDay = prop([]),
visitorsTotal = prop(0),
Function renderBody
has 99 lines of code (exceeds 25 allowed). Consider refactoring. Open
private renderBody({ projectPublishByStepsVM, userInfoEditVM, showPopError } : ProjectsPublishByStepsState) {
if (projectPublishByStepsVM.isLoadingProject || userInfoEditVM.isLoading) {
return h.loader()
} else {
Function oninit
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
oninit: function(vnode) {
const filtersVM = vnode.attrs.filtersVM,
displayModal = h.toggleProp(false, true),
contributionsPerDay = prop([]),
visitorsTotal = prop(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
File project-contribution-report-content-card.js
has 329 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';
Function displayTabContent
has 96 lines of code (exceeds 25 allowed). Consider refactoring. Open
const displayTabContent = () => {
hash(window.location.hash);
const isUnpublishedAdmin = !project().is_published || project().is_admin_role;
const isEmptyHash = _.isEmpty(hash()) || hash() === '#_=_';
Function oninit
has 96 lines of code (exceeds 25 allowed). Consider refactoring. Open
oninit: function(vnode) {
let bankl;
const currentItem = prop(vnode.attrs.item);
const project_id = vnode.attrs.item.project_id;
const loadBank = () => {
Function view
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
view: function({state, attrs}) {
const list = attrs.list;
const isFailed = attrs.project().state === 'failed';
return m('.w-section.bg-gray.before-footer.section', state.loading() ? h.loader() : [
- 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 26 (exceeds 5 allowed). Consider refactoring. Open
view: function({state, attrs}) {
const actions = state.actions,
item = state.currentItem(),
user = state.user(),
bankAccount = state.bankAccount(),
- 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 25 (exceeds 5 allowed). Consider refactoring. Open
view: function({state, attrs}) {
const project = _.first(state.projectDetails());
const acceptedIndex = state.acceptedIndex;
const account = _.first(state.projectAccount());
- 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 25 (exceeds 5 allowed). Consider refactoring. Open
view: function({state, attrs}) {
const project = attrs.project,
subscribersDetails = attrs.subscribersDetails,
balanceData = (state.balanceData() && !_.isNull(_.first(state.balanceData())) ? _.first(state.balanceData()) : null);
- 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 89 lines of code (exceeds 25 allowed). Consider refactoring. Open
oninit: function(vnode) {
const displayForm = h.toggleProp(false, true),
displayFormWithName = prop(''),
sendSuccess = prop(false),
submitDisabled = prop(false),
Function oninit
has 89 lines of code (exceeds 25 allowed). Consider refactoring. Open
oninit: function(vnode) {
const builder = vnode.attrs.data,
complete = prop(false),
data = {},
error = prop(false),
Function view
has 88 lines of code (exceeds 25 allowed). Consider refactoring. Open
view({ state, attrs }) {
const onSearch = attrs.onSearch;
const onSelect = attrs.onSelect;
const isLoading = attrs.isLoading;
Function wrap
has 87 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function wrap(component, customAttr) {
if (!app) {
app = document.getElementById('application');
}
Function view
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
view({attrs}) {
const onClose = attrs.onClose;
const categories = attrs.categories;
const closePreventRedirect = (/** @type {Event} */ event) => {
event.preventDefault();
Function oninit
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
oninit: function(vnode) {
const {
ViewContentEvent,
AddToCartEvent
} = projectVM;
- 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 24 (exceeds 5 allowed). Consider refactoring. Open
view: function({state, attrs}) {
const project = attrs.project,
rewardDetails = attrs.rewardDetails,
activeSubscriptions = _.filter(state.userProjectSubscriptions(), sub => sub.status === 'active'),
sortedSubscriptions = _.sortBy(state.userProjectSubscriptions(), sub => _.indexOf(['active', 'started', 'canceling', 'inactive', 'canceled'], sub.status));
- 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 24 (exceeds 5 allowed). Consider refactoring. Open
view: function ({ attrs }) {
const disableInternational = attrs.disableInternational;
const countryName = attrs.countryName;
const fields = attrs.fields;
const international = attrs.international;
- 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 24 (exceeds 5 allowed). Consider refactoring. Open
oninit: function(vnode) {
const storeKey = 'selectedReward',
MINIMUM_VALUE = 10,
reward = vnode.attrs.reward,
vm = rewardVM,
- 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"