catarse/catarse.js

View on GitHub

Showing 570 of 1,380 total issues

Function displayTabContent has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

            displayTabContent = (user) => {
                const tabs = {
                    '#projects': m(userCreated, {
                        userId,
                        showDraft: true
Severity: Minor
Found in legacy/src/root/users-edit.js - About 1 hr to fix

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

        oninit: function(vnode) {
            const contribution = vnode.attrs.contribution,
                mapEvents = _.reduce([{
                    date: contribution.paid_at,
                    name: 'Apoio confirmado'
    Severity: Minor
    Found in legacy/src/c/admin-transaction-history.js - About 1 hr to fix

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

          view({attrs}) {
      
              const projects = attrs.projects;
              const isSearch = attrs.isSearch;
              const filterKeyName = attrs.filterKeyName;
      Severity: Minor
      Found in legacy/src/c/explore/explore-projects-list.js - About 1 hr to fix

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

            view({ state, attrs }) {
        
                /** @type {string} */
                const reportsExportingUrl = attrs.reportsExportingUrl;
        
        
        Severity: Minor
        Found in legacy/src/root/requested-subscription-reports-modal.js - About 1 hr to fix

          Function uploadImage has 34 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                      uploadImage = () => {
                          const userUploadedImageEl = window.document.getElementById('user_uploaded_image'),
                              userCoverImageEl = window.document.getElementById('user_cover_image'),
                              formData = new FormData();
          
          
          Severity: Minor
          Found in legacy/src/c/user-about-edit.js - About 1 hr to fix

            Function mapRailsErrors has 34 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            const mapRailsErrors = (rails_errors) => {
                let parsedErrors;
                try {
                    parsedErrors = JSON.parse(rails_errors);
                } catch (e) {
            Severity: Minor
            Found in legacy/src/vms/user-settings-vm.js - About 1 hr to fix

              Function payWithNewCard has 34 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  const payWithNewCard = (contribution_id, installment) => {
                      const p = new Promise((resolve, reject) => {
                          m.request({
                              method: 'GET',
                              url: `/payment/pagarme/${contribution_id}/get_encryption_key`,
              Severity: Minor
              Found in legacy/src/vms/payment-vm.js - About 1 hr to fix

                Function startVM has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                const startVM = (I18n) => {
                    const i18nStart = I18n.translations[I18n.currentLocale()].pages.start,
                        testimonials = i18nStart.testimonials,
                        categoryProjects = i18nStart.categoryProjects,
                        panes = i18nStart.panes,
                Severity: Minor
                Found in legacy/src/vms/start-vm.js - About 1 hr to fix

                  Function AjaxEvent has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  getJasmineRequireObj().AjaxEvent = function() {
                    function now() {
                      return new Date().getTime();
                    }
                  
                  
                  Severity: Minor
                  Found in legacy/spec/lib/jasmine-ajax/mock-ajax.js - About 1 hr to fix

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

                        view({ attrs }) {
                            return (
                                <div class="dashboard-column-tips">
                                    <div class="card card-secondary">
                                        <div>
                    Severity: Minor
                    Found in legacy/src/c/projects/publish-by-steps/rewards-edit-tips.tsx - About 1 hr to fix

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

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

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

                          Function equals_ has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          jasmine.Env.prototype.equals_ = function(a, b, mismatchKeys, mismatchValues) {
                            mismatchKeys = mismatchKeys || [];
                            mismatchValues = mismatchValues || [];
                          
                            for (var i = 0; i < this.equalityTesters_.length; i++) {
                          Severity: Minor
                          Found in legacy/spec/lib/jasmine/jasmine.js - About 1 hr to fix

                            Function addViewModel has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    function addViewModel() {
                            
                                        const statesProp = prop<State[]>([])
                            
                                        const fieldsMap = {
                            Severity: Minor
                            Found in legacy/src/c/projects/publish-by-steps/user-info-edit-settings.tsx - About 1 hr to fix

                              Function saveFields has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  private async saveFields(fields : string[], requiredFields : string[]) {
                                      
                                      this._isSavingProject = true
                                      
                                      h.redraw()
                              Severity: Minor
                              Found in legacy/src/vms/project-publish-by-steps-vm.ts - About 1 hr to fix

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

                                    oninit({ state, attrs} : m.Vnode<InputPermalinkAttrs, InputPermalinkState>) {
                                        state.class = attrs.class
                                        state.currentPermalink = attrs.currentPermalink
                                        state.checkPermalinkAvailable = async (inputText) => {
                                            let lastValidValue = state.currentPermalink
                                Severity: Minor
                                Found in legacy/src/c/projects/publish-by-steps/input-permalink.tsx - About 1 hr to fix

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

                                      oninit: function(vnode) {
                                          const statusClass = {
                                                  active: 'fa-circle.text-success',
                                                  started: 'fa-circle.text-waiting',
                                                  inactive: 'fa-circle.text-error',
                                  Severity: Minor
                                  Found in legacy/src/c/subscription-status-icon.js - About 1 hr to fix

                                    Function fetch has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                                fetch = (token, pageUrl) => {
                                                    if (!modalToggle()) {
                                                        modalToggle.toggle();
                                                        loadingContacts(true);
                                                        m.redraw();
                                    Severity: Minor
                                    Found in legacy/src/c/project-google-contact-import.js - About 1 hr to fix

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

                                                  updateUserData = (user_id) => {
                                                      const userData = {
                                                          owner_name: fields.owner_name(),
                                                          owner_document: fields.owner_document(),
                                                          bank_id: bankCode(),
                                      Severity: Minor
                                      Found in legacy/src/c/user-billing.js - About 1 hr to fix

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

                                            oninit: function(vnode) {
                                                let interval;
                                                const collection = prop([]),
                                                    resource = prop(),
                                                    collectionIndex = prop(0),
                                        Severity: Minor
                                        Found in legacy/src/c/contribution-activities.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language