Showing 570 of 1,380 total issues
Avoid too many return
statements within this function. Open
return thing.map(getContent).join('')
Avoid too many return
statements within this function. Open
return hasErrorOn('address_city')
Avoid too many return
statements within this function. Open
return (
<UserInfoEdit
user={userInfoEditVM.user}
isSaving={userInfoEditVM.isSaving || projectPublishByStepsVM.isSaving}
hasErrorOn={(field : string) => userInfoEditVM.hasErrorOn(field)}
Avoid too many return
statements within this function. Open
var monster={set:function(name,value,days,path,secure,domain){var date=new Date(),expires='',type=typeof(value),valueToUse='',secureFlag='';path=path||"/";if(days){date.setTime(date.getTime()+(days*24*60*60*1000));expires="; expires="+date.toUTCString();}if(type==="object"&&type!=="undefined"){if(!("JSON"in window))throw"Bummer, your browser doesn't support JSON parsing.";valueToUse=encodeURIComponent(JSON.stringify({v:value}));}else{valueToUse=encodeURIComponent(value);}if(secure){secureFlag="; secure";}domain=domain?"; domain="+encodeURIComponent(domain):"";document.cookie=name+"="+valueToUse+expires+"; path="+path+secureFlag+domain;},get:function(name){var nameEQ=name+"=",ca=document.cookie.split(';'),value='',firstChar='',parsed={};for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==' ')c=c.substring(1,c.length);if(c.indexOf(nameEQ)===0){value=decodeURIComponent(c.substring(nameEQ.length,c.length));firstChar=value.substring(0,1);if(firstChar=="{"){try{parsed=JSON.parse(value);if("v"in parsed)return parsed.v;}catch(e){return value;}}if(value=="undefined")return undefined;return value;}}return null;},remove:function(name){this.set(name,"",-1);},increment:function(name,days){var value=this.get(name)||0;this.set(name,(parseInt(value,10)+1),days);},decrement:function(name,days){var value=this.get(name)||0;this.set(name,(parseInt(value,10)-1),days);}};
Avoid too many return
statements within this function. Open
return hasErrorOn('phone_number')
Avoid too many return
statements within this function. Open
return hasErrorOn(field)
Avoid too many return
statements within this function. Open
return (
<RewardsEdit project={projectPublishByStepsVM.project} />
)
Avoid too many return
statements within this function. Open
return (
<ShareReminder project={project} />
)
Avoid too many return
statements within this function. Open
return (
<Todo />
)
Avoid too many return
statements within this function. Open
return (
<Share project={project} />
)
Avoid too many return
statements within this function. Open
return false;
Avoid too many return
statements within this function. Open
return hasErrorOn('address_neighbourhood')
Avoid too many return
statements within this function. Open
return hasErrorOn('address_zip_code')
Avoid too many return
statements within this function. Open
return true;
Function view
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
view: function({attrs}) {
const project = attrs.project(),
paymentState = project.state === 'failed' ? 'paid,refunded' : 'paid',
isFailed = project.state === 'failed',
isSuccessful = project.state === 'successful',
- 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 6 (exceeds 5 allowed). Consider refactoring. Open
view: function({state, attrs}) {
const stats = _.first(state.stats());
const testimonials = () => _.map(state.testimonials, (testimonial) => {
const content = m('.card.u-radius.card-big.card-terciary', [
m('.u-text-center.u-marginbottom-20', [
- 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 6 (exceeds 5 allowed). Consider refactoring. Open
view: function({state, attrs}) {
const reward = attrs.reward(),
contribution = attrs.contribution,
available = parseInt(reward.paid_count) + parseInt(reward.waiting_payment_count),
shippingFee = state.shippingFee();
- 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 6 (exceeds 5 allowed). Consider refactoring. Open
view: function({state, attrs}) {
const
captalize = (str) => str.charAt(0).toUpperCase() + str.slice(1),
paymentStatus = attrs.payment.status,
paymentAmount = attrs.payment.amount,
- 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 6 (exceeds 5 allowed). Consider refactoring. Open
oninit: function(vnode) {
const templates = commonNotification.paginationVM(
models.notificationTemplates, 'label.asc'),
loaderTemp = prop(true),
loaderSubmit = 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 view
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
view: function({state, attrs}) {
const project = state.projectVM.currentProject;
const projectVM = state.projectVM;
const projectOwner = state.projectOwner;
const displayAdultContentPopup = state.displayAdultContentPopup;
- 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"