catarse/catarse.js

View on GitHub

Showing 570 of 1,380 total issues

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

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

    Function showLastSubscriptionVersionRewardTitleIfHasOne has 38 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            const showLastSubscriptionVersionRewardTitleIfHasOne = () => {
                const is_active = subscription.status === 'active';
                const current_paid_subscription = subscription.current_paid_subscription;
                const current_reward_data = subscription.current_reward_data;
                const current_reward_id = subscription.current_reward_id;
    Severity: Minor
    Found in legacy/src/c/user-subscription-box.js - About 1 hr to fix

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

          oninit: function(vnode) {
              const vm = projectDescriptionVideoVM,
                  mapErrors = [
                        ['about_html', ['about_html']],
                        ['video_url', ['video_url']]
      Severity: Minor
      Found in legacy/src/c/project-description-video-edit.js - About 1 hr to fix

        Function select has 38 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          function select(matchesSelector) {
            return function matches(node) {
              if (!node) {
                return []
              }
        Severity: Minor
        Found in legacy/spec/lib/mithril-query/mithril-query.js - About 1 hr to fix

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

              oninit: function(vnode) {
                  const emailText = prop(''),
                      loading = prop(false),
                      project = vnode.attrs.project,
                      showSuccess = prop(false),
          Severity: Minor
          Found in legacy/src/c/project-email-invite.js - About 1 hr to fix

            Function MockAjax has 38 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            getJasmineRequireObj().MockAjax = function($ajax) {
              function MockAjax(global) {
                var requestTracker = new $ajax.RequestTracker(),
                  stubTracker = new $ajax.StubTracker(),
                  paramParser = new $ajax.ParamParser(),
            Severity: Minor
            Found in legacy/spec/lib/jasmine-ajax/mock-ajax.js - About 1 hr to fix

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

                  oninit: function(vnode) {
                      const exploreButtonBehavoir = h.RedrawStream((/** @type {Event} */ event) => {
                          event.preventDefault();
                          m.route.set('/explore?ref=ctrse_header&filter=all');
                      });
              Severity: Minor
              Found in legacy/src/root/menu.js - About 1 hr to fix

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

                    oninit: function(vnode) {
                        const projectIdVM = catarse.filtersVM({ project_id: 'eq' }),
                            projectAccounts = prop([]),
                            projectTransfers = prop([]),
                            showTaxModal = h.toggleProp(false, true),
                Severity: Minor
                Found in legacy/src/c/project-successful-onboard.js - About 1 hr to fix

                  Function oninit has 37 lines of code (exceeds 25 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

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

                        oninit: function(vnode) {
                            const vm = projectVideoVM,
                                mapErrors = [
                                      ['video_url', ['video_url']]
                                ],
                    Severity: Minor
                    Found in legacy/src/c/project-video-edit.js - About 1 hr to fix

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

                          oninit: function(vnode) {
                              const vm = projectDescriptionVM,
                                  mapErrors = [
                                        ['about_html', ['about_html']]
                                  ],
                      Severity: Minor
                      Found in legacy/src/c/project-description-edit.js - About 1 hr to fix

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

                            oninit: function(vnode) {
                                const vm = projectBudgetVM,
                                    mapErrors = [
                                          ['budget', ['budget']]
                                    ],
                        Severity: Minor
                        Found in legacy/src/c/project-budget-edit.js - About 1 hr to fix

                          Function collectionsMapper has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  const collectionsMapper = (sampleNo, name) => {
                                      const f = filters[name],
                                          forSubPledged = name === 'sub' ? { pledged: 'gte.1000' } : {},
                                          defaultOptions = {
                                              order: 'score.desc',
                          Severity: Minor
                          Found in legacy/src/c/projects-display.js - About 1 hr to fix

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

                                oninit: function(vnode) {
                                    const designStates = {
                                            waiting_funds: {
                                                processing: {
                                                    lineClass: '.done',
                            Severity: Minor
                            Found in legacy/src/c/project-successful-progress-bar.js - About 1 hr to fix

                              Function formatCardInputNumber has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              const formatCardInputNumber = (e, cardNumberProp) => {
                                  let $target,
                                      card,
                                      digit,
                                      length,
                              Severity: Minor
                              Found in legacy/src/vms/credit-card-vm.js - About 1 hr to fix

                                Function loadSurvey has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                        const loadSurvey = () => {
                                            surveyLoader().load().then((data) => {
                                                survey(_.first(data));
                                                finished(!_.isEmpty(survey().finished_at));
                                                answeredAt(survey().survey_answered_at);
                                Severity: Minor
                                Found in legacy/src/root/surveys-show.js - About 1 hr to fix

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

                                      oninit: function(vnode) {
                                          
                                          const {
                                              ViewContentEvent,
                                          } = projectVM;
                                  Severity: Minor
                                  Found in legacy/src/root/projects-subscription-contribution.js - About 1 hr to fix

                                    Function updateUserData has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                            const updateUserData = (user_id) => {
                                                const userData = {};
                                                userData.bank_account_attributes = {
                                                    bank_id: bankCode(),
                                                    input_bank_number: bankInput(),
                                    Severity: Minor
                                    Found in legacy/src/c/user-balance-request-modal-content.js - About 1 hr to fix

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

                                          oninit: function(vnode) {
                                              const contributedProjects = prop(),
                                                  user_id = vnode.attrs.userId,
                                                  pages = contributionVM.getUserContributedProjectsWithFilter(),
                                                  error = prop(false),
                                      Severity: Minor
                                      Found in legacy/src/c/user-contributed.js - About 1 hr to fix

                                        Function matcherFn_ has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        jasmine.Matchers.matcherFn_ = function(matcherName, matcherFunction) {
                                          return function() {
                                            var matcherArgs = jasmine.util.argsToArray(arguments);
                                            var result = matcherFunction.apply(this, arguments);
                                        
                                        
                                        Severity: Minor
                                        Found in legacy/spec/lib/jasmine/jasmine.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language