Showing 570 of 1,380 total issues
Function oninit
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
oninit: function(vnode) {
let builder = vnode.attrs.data,
complete = prop(false),
error = prop(false),
fail = prop(false),
Function view
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
view({ attrs } : m.Vnode<AskAboutRewardAttrs>) {
const project = attrs.project
const userName = attrs.project.user?.public_name
const askTo = userName || project.name
Consider simplifying this complex logical expression. Open
if (eventObj) {
try {
var project = eventObj.project||_getProject(),
user = eventObj.user||_getUser();
var ga = window.ga;//o ga tem q ser verificado aqui pq pode não existir na criaçaõ do DOM
Function oninit
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
oninit: function(vnode) {
const togglePreview = () => {
h.scrollTop();
vnode.attrs.showPreview(false);
},
Function updateUser
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
updateUser = () => {
const userData = {
current_password: fields.current_password(),
password: fields.password(),
email: fields.email(),
Function oninit
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
oninit: function (vnode) {
const
firstValue = prop(0),
secondValue = prop(0),
clearFieldValues = () => { firstValue(0), secondValue(0) },
Function oninit
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
oninit: function(vnode) {
const builder = vnode.attrs.data,
complete = prop(false),
error = prop(false),
fail = prop(false),
Function format
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
jasmine.PrettyPrinter.prototype.format = function(value) {
if (this.ppNestLevel_ > 40) {
throw new Error('jasmine.PrettyPrinter: format() nested too deeply!');
}
Function view
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
view({ attrs } : m.Vnode<RewardsEditAttrs>) {
const project = attrs.project
return (
<div class="section">
Function projectStateTextClass
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
projectStateTextClass = (state, has_cancelation_request) => {
const statusText = {
online: {
cssClass: 'text-success',
text: 'NO AR',
Function exports
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = (config) => {
config.set({
basePath: '',
frameworks: ['jasmine'],
files: [
Function oninit
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
oninit: function(vnode) {
const userIdVM = catarse.filtersVM({ user_id: 'eq' });
userIdVM.user_id(vnode.attrs.user_id);
Function oninit
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
oninit: function(vnode) {
let parentHeight = prop(0),
width = prop(vnode.attrs.width || 280),
top = prop(0),
left = prop(0),
Function oninit
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
oninit: function (vnode) {
const parsedErrors = vnode.attrs.parsedErrors;
const userBankAccount = vnode.attrs.userBankAccount;
const banks = vnode.attrs.banks;
const showOtherBanks = h.toggleProp(false, true);
Function oninit
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
oninit: function(vnode) {
const hash = prop(window.location.hash),
displayTabContent = (project) => {
const c_opts = {
project,
Function view
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
view: function({state, attrs}) {
const balance = _.first(state.userBalances()) || { user_id: attrs.user_id, amount: 0 },
positiveValue = balance.amount >= 0,
balanceRequestModalC = [
userBalanceRequestModalContent,
- 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 13 (exceeds 5 allowed). Consider refactoring. Open
view: function({attrs}) {
const project = attrs.project,
isSub = projectVM.isSubscription(project);
return !_.isUndefined(project()) ? m(`.w-section.page-header${isSub ? '.transparent-background' : ''}`, [
- 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 13 (exceeds 5 allowed). Consider refactoring. Open
oninit: function(vnode) {
const {
ViewContentEvent,
} = 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 oninit
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
oninit: function(vnode) {
const {
ViewContentEvent,
} = 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 oninit
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
oninit: function(vnode) {
let listVM = contributionListVM,
filterVM = contributionFilterVM,
error = prop(''),
filterBuilder = [{ // full_text_index
- 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"