gngeorgiev/firesync

View on GitHub
src/firesyncBase.js

Summary

Maintainability
C
1 day
Test Coverage

Function _attach has 95 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    _attach() {
        Object.observe(this, (args) => {
            let filteredArgs = _.chain(args)
            .filter((arg) => {
                return !this.$$.FILTERED_PROPERTIES.has(arg.name);
Severity: Major
Found in src/firesyncBase.js - About 3 hrs to fix

    File firesyncBase.js has 268 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    'use strict';
    
    import { EventEmitter2 } from 'eventemitter2';
    import _ from 'lodash';
    import queue from 'queue';
    Severity: Minor
    Found in src/firesyncBase.js - About 2 hrs to fix

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

          _updateBindings(changes, origin, target = constants.BINDING_TARGET.ANY, force = false) {
              return new Promise((resolve) => {
                  let bindingQueue = queue();
      
                  this.$$.bindings.forEach((binding) => {
      Severity: Minor
      Found in src/firesyncBase.js - About 1 hr to fix

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

            bindTo(settings) {
                _.extend(settings, {
                    data: this
                });
        
        
        Severity: Minor
        Found in src/firesyncBase.js - About 1 hr to fix

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

                          let handler = (snap, prevChild) => {
                              let property = snap.key();
                              let value = snap.val();
                              let type;
          
          
          Severity: Minor
          Found in src/firesyncBase.js - About 1 hr to fix

            Function queuedBinding has 26 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                            let queuedBinding = (cb) => {
                                if (binding.inProgress && binding.origin !== origin && !force) {
                                    return cb();
                                }
            
            
            Severity: Minor
            Found in src/firesyncBase.js - About 1 hr to fix

              There are no issues that match your filters.

              Category
              Status