Showing 570 of 1,380 total issues
Function view
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
view({ state, attrs }) {
const GATrackingID = state.GATrackingID;
const FBPixelTrackingID = state.FBPixelTrackingID;
const save = state.save;
Function oninit
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
oninit: function(vnode) {
const storeKey = 'selectedReward',
MINIMUM_VALUE = 10,
reward = vnode.attrs.reward,
vm = rewardVM,
Function oninit
has 73 lines of code (exceeds 25 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);
Function view
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
view: function({ state, attrs }) {
if (state.parsedErrors) {
const parsedErrors = state.parsedErrors;
state.fields.errors = {
- 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 21 (exceeds 5 allowed). Consider refactoring. Open
oninit: function(vnode) {
let parsedErrors = userAboutVM.mapRailsErrors(railsErrorsVM.railsErrors());
let deleteUser;
const user = vnode.attrs.user || {},
fields = {
- 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 availableAction
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
const availableAction = (reward) => {
if (canBeCreated(reward)) {
return m('.w-col.w-col-3.w-col-small-small-stack.w-col-tiny-tiny-stack',
m('a.btn.btn-small.w-button', {
onclick: () => m.route.set(`/projects/${state.project_id}/rewards/${reward.id}/surveys/new`)
Function oninit
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
oninit: function(vnode) {
const project = vnode.attrs.project,
progress = project.progress.toFixed(2),
remainingTextObj = h.translatedTime(project.remaining_time),
elapsedTextObj = h.translatedTime(project.elapsed_time),
File project-report-infringes-intellectual-property.js
has 283 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* window.c.projectReportInfringesIntellectulaProperty component
* Render project report form
*
*/
Function oninit
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
oninit: function(vnode) {
const userBankAccount = prop(null),
showPopNotification = prop(false),
popNotificationAttributes = prop({}),
metadata = vnode.attrs.item.last_transition_metadata || { transfer_data: {} },
Function view
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
view: function({state, attrs}) {
const vm = state.vm;
const serviceFee = (vm.fields.service_fee() * 100).toFixed(2).replace(/(\.|,)?0+$/g, '');
return m('#goal-tab', [
- 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 20 (exceeds 5 allowed). Consider refactoring. Open
oninit({ attrs, state }: m.Vnode<RewardsEditListAttrs, RewardsEditListState>) {
const rewards = prop<StreamType<RewardDetailsStream>[]>([])
const loading = attrs.loading
const error = attrs.error
const errors = attrs.errors
- 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 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
oninit: function(vnode) {
const contributionsPerDay = prop([]),
listVM = projectVM.isSubscription(vnode.attrs.project()) ? getProjectSubscribersListVM() : getProjectContributorsListVM(),
filterStats = catarse.filtersVM({
project_id: 'eq'
Function oninit
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
oninit: function(vnode) {
const {
ViewContentEvent,
} = projectVM;
Function oninit
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
oninit: function(vnode) {
const payment = vnode.attrs.item;
let card = null,
displayPaymentMethod,
paymentMethodClass,
Function oninit
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
oninit: function(vnode) {
const rewards = prop([]),
currentRewardId = prop(),
currentReward = prop(),
showSuccess = prop(false),
Function _event
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
function _event(eventObj, fn, ignoreGA) {
if (eventObj) {
try {
var project = eventObj.project||_getProject(),
user = eventObj.user||_getUser();
Function oninit
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
oninit: function (vnode) {
const {
ViewContentEvent,
AddToCartEvent
- 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 19 (exceeds 5 allowed). Consider refactoring. Open
view: function({attrs}) {
const collection = attrs.collection,
title = attrs.title || collection.title,
ref = attrs.ref,
showFriends = attrs.showFriends,
- 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 compareObjects_
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
jasmine.Env.prototype.compareObjects_ = function(a, b, mismatchKeys, mismatchValues) {
if (a.__Jasmine_been_here_before__ === b && b.__Jasmine_been_here_before__ === a) {
return true;
}
- 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 format
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
jasmine.PrettyPrinter.prototype.format = function(value) {
if (this.ppNestLevel_ > 40) {
throw new Error('jasmine.PrettyPrinter: format() nested too deeply!');
}
- 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"