catarse/catarse.js

View on GitHub

Showing 570 of 1,380 total issues

Function oninit has 48 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    oninit: function(vnode) {
        const filtersVM = catarse.filtersVM({
                project_id: 'eq'
            }),
            projectDetails = prop([]),
Severity: Minor
Found in legacy/src/root/insights.js - About 1 hr to fix

    Function oninit has 48 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        oninit: function(vnode) {
            let l = prop(false);
            const sendSuccess = prop(false),
                userDetails = vnode.attrs,
                submitDisabled = prop(false),
    Severity: Minor
    Found in legacy/src/c/owner-message-content.js - About 1 hr to fix

      Function oninit has 48 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),
      Severity: Minor
      Found in legacy/src/c/admin-reset-password.js - About 1 hr to fix

        Function view has 48 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            view({attrs} : m.Vnode<RewardsEditListCardAttrs>) {
                const reward = attrs.reward
                const index = attrs.index
                const error = attrs.error
                const errors = attrs.errors
        Severity: Minor
        Found in legacy/src/c/projects/edit/rewards-edit-list-card.tsx - About 1 hr to fix

          Function AjaxParamParser has 48 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          getJasmineRequireObj().AjaxParamParser = function() {
            function ParamParser() {
              var defaults = [
                {
                  test: function(xhr) {
          Severity: Minor
          Found in legacy/spec/lib/jasmine-ajax/mock-ajax.js - About 1 hr to fix

            Function oninit has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
            Open

                oninit: function(vnode) {
                    const rewards = prop([]),
                        currentRewardId = prop(),
                        currentReward = prop(),
                        showSuccess = prop(false),
            Severity: Minor
            Found in legacy/src/root/project-edit-welcome.js - About 1 hr to fix

            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 15 (exceeds 5 allowed). Consider refactoring.
            Open

                view: function({state, attrs}) {
                    const goal = attrs.goal(),
                        inlineError = message => m('.fontsize-smaller.text-error.u-marginbottom-20.fa.fa-exclamation-triangle',
                            m('span',
                                message
            Severity: Minor
            Found in legacy/src/c/project-goal-edit-card.js - About 1 hr to fix

            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 15 (exceeds 5 allowed). Consider refactoring.
            Open

                oninit: function(vnode) {
                    const fixedNavClass = 'project-nav-fixed',
                        isFixed = prop(false),
                        originalPosition = prop(-1),
                        project = vnode.attrs.project;
            Severity: Minor
            Found in legacy/src/c/project-tabs.js - About 1 hr to fix

            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 15 (exceeds 5 allowed). Consider refactoring.
            Open

                oninit: function(vnode) {
                    const table = prop(vnode.attrs.table),
                        sortIndex = prop(-1);
            
                    const comparator = (a, b) => {
            Severity: Minor
            Found in legacy/src/c/project-data-table.js - About 1 hr to fix

            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 AjaxRequestTracker has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
            Open

            getJasmineRequireObj().AjaxRequestTracker = function() {
              function RequestTracker() {
                var requests = [];
            
                this.track = function(request) {
            Severity: Minor
            Found in legacy/spec/lib/jasmine-ajax/mock-ajax.js - About 1 hr to fix

            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 reportRunnerStarting has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
            Open

            jasmine.reporting.StyledHtmlReporter.prototype.reportRunnerStarting = function(runner) {
              var showPassed, showSkipped;
            
              this.outerDiv = this.createDom('div', { className: 'jasmine_reporter' },
                  this.createDom('div', { className: 'banner' },
            Severity: Minor
            Found in legacy/spec/lib/jasmine-species/jasmine-reporting.js - About 1 hr to fix

            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 47 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                                view({state, attrs}) {
                                    return m('', [
                                        m('.modal-dialog-header', [
                                            m('.fontsize-large.u-text-center', attrs.modalTitle)
                                        ]),
            Severity: Minor
            Found in legacy/src/root/admin-subscriptions.js - About 1 hr to fix

              Function oninit has 47 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  oninit: function(vnode) {
                      const vm = vnode.attrs.vm,
                          isSubscriptionEdit = vnode.attrs.isSubscriptionEdit || prop(false),
                          slipPaymentDate = projectVM.isSubscription() ? null : vm.getSlipPaymentDate(vnode.attrs.contribution_id),
                          loading = prop(false),
              Severity: Minor
              Found in legacy/src/c/payment-slip.js - About 1 hr to fix

                Function view has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    view({state, attrs}) {
                    
                        const isSelected = attrs.isSelected;
                        const itemToString = attrs.itemToString;
                        const onSelect = attrs.onSelect;
                Severity: Minor
                Found in legacy/src/c/explore/explore-filter-select.ts - About 1 hr to fix

                  Function oninit has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      oninit: function(vnode) {
                          const userDetails = prop({}),
                              userId = vnode.attrs.user_id.split('-')[0],
                              hash = prop(window.location.hash),
                              displayTabContent = (user) => {
                  Severity: Minor
                  Found in legacy/src/root/users-edit.js - About 1 hr to fix

                    Function oninit has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        oninit: function(vnode) {
                            const 
                                wishedState = 'transferred',
                                userIdVM = catarse.filtersVM({user_id: 'eq', state: 'eq'}),
                                lastBalanceTransfer = catarse.paginationVM(models.balanceTransfer, 'created_at.desc', { Prefer: 'count=exact' }),
                    Severity: Minor
                    Found in legacy/src/c/project-successful-next-steps.js - About 1 hr to fix

                      Function oninit has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          oninit: function(vnode) {
                              const body = document.getElementsByTagName('body')[0],
                                  editLinksToggle = h.toggleProp(true, false),
                                  validating = prop(false),
                                  showPublish = h.toggleProp(true, false),
                      Severity: Minor
                      Found in legacy/src/c/project-dashboard-menu.js - About 1 hr to fix

                        Function view has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            view({ attrs }) {
                        
                                /** @type {AdultPopupModalAttrs} */
                                const {
                                    userPublicName,
                        Severity: Minor
                        Found in legacy/src/c/adult-popup-modal.js - About 1 hr to fix

                          Function view has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              view({ attrs, state }: m.Vnode<RewardsEditListAttrs, RewardsEditListState>) {
                          
                                  const loading = attrs.loading
                                  const error = attrs.error
                                  const errors = attrs.errors
                          Severity: Minor
                          Found in legacy/src/c/projects/edit/rewards-edit-list.tsx - About 1 hr to fix

                            Function save has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                async save(profileImage? : File) : Promise<boolean> {
                                    
                                    try {
                                        this.clearErrors()
                                        this._isSaving = true
                            Severity: Minor
                            Found in legacy/src/vms/user-info-edit-vm.ts - About 1 hr to fix
                              Severity
                              Category
                              Status
                              Source
                              Language