mihnsen/ui-carousel

View on GitHub

Showing 6 of 15 total issues

File carousel.controller.js has 380 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**
 * angular-ui-carousel
 * for example:
 * length = 8, show = 4, scroll = 3, current = 0
 *          ---------
Severity: Minor
Found in src/ui-carousel/controllers/carousel.controller.js - About 5 hrs to fix

    Function slideHandler has 75 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        this.slideHandler = (index) => {
          // TODO prevent when slides not exists
          if (!this.slides) {
            return $q.reject('Carousel not fully setup');
          }
    Severity: Major
    Found in src/ui-carousel/controllers/carousel.controller.js - About 3 hrs to fix

      Function initOptions has 45 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          this.initOptions = () => {
            this.options = angular.extend({}, Carousel.getOptions());
      
            // TODO customize attribute from directive
            if (this.initialSlide !== undefined) {
      Severity: Minor
      Found in src/ui-carousel/controllers/carousel.controller.js - About 1 hr to fix

        Function exports has 39 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        module.exports = function(config) {
          config.set({
        
            // base path that will be used to resolve all patterns (eg. files, exclude)
            basePath: '',
        Severity: Minor
        Found in karma-src.conf.js - About 1 hr to fix

          Function setProps has 27 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              this.setProps = () => {
                const bodyStyle = document.body.style;
          
                /* eslint-disable */
                if (bodyStyle.OTransform !== undefined) {
          Severity: Minor
          Found in src/ui-carousel/controllers/carousel.controller.js - About 1 hr to fix

            Avoid too many return statements within this function.
            Open

                  return this
                    .moveTrack(left)
                    .then(() => {
                      this.isTrackMoving = false;
                      this.currentSlide = target;
            Severity: Major
            Found in src/ui-carousel/controllers/carousel.controller.js - About 30 mins to fix
              Severity
              Category
              Status
              Source
              Language