Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B bootstrap
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 263
    • Issues 263
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 114
    • Merge requests 114
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Bootstrap
  • bootstrap
  • Issues
  • #13512
Closed
Open
Issue created May 05, 2014 by Administrator@rootContributor

Missing space after `return` keyword

Created by: feryardiant

Hi! I'm just clone it and installing all dependencies, everythings goes fine until the build process. When I run grunt command, I got this output:

feryardiant in .../localhost/local/twbs-bootstrap on new-branch
→ grunt
Running "less:compileCore" (less) task
File dist/css/bootstrap.css.map created.
File dist/css/bootstrap.css created: 129.12 kB → 129.16 kB

Running "less:compileTheme" (less) task
File dist/css/bootstrap-theme.css.map created.
File dist/css/bootstrap-theme.css created: 16.58 kB → 16.63 kB

Running "autoprefixer:core" (autoprefixer) task
File dist/css/bootstrap.css created.
File dist/css/bootstrap.css.map created (source map).

Running "autoprefixer:theme" (autoprefixer) task
File dist/css/bootstrap-theme.css created.
File dist/css/bootstrap-theme.css.map created (source map).

Running "autoprefixer:docs" (autoprefixer) task
File docs/assets/css/_src/docs.css created.

Running "autoprefixer:examples" (autoprefixer) task
File docs/examples/blog/blog.css created.
File docs/examples/carousel/carousel.css created.
File docs/examples/cover/cover.css created.
File docs/examples/dashboard/dashboard.css created.
File docs/examples/equal-height-columns/equal-height-columns.css created.
File docs/examples/grid/grid.css created.
File docs/examples/jumbotron-narrow/jumbotron-narrow.css created.
File docs/examples/jumbotron/jumbotron.css created.
File docs/examples/justified-nav/justified-nav.css created.
File docs/examples/navbar-fixed-top/navbar-fixed-top.css created.
File docs/examples/navbar-static-top/navbar-static-top.css created.
File docs/examples/navbar/navbar.css created.
File docs/examples/non-responsive/non-responsive.css created.
File docs/examples/offcanvas/offcanvas.css created.
File docs/examples/rtl/rtl.css created.
File docs/examples/signin/signin.css created.
File docs/examples/starter-template/starter-template.css created.
File docs/examples/sticky-footer-navbar/sticky-footer-navbar.css created.
File docs/examples/sticky-footer/sticky-footer.css created.
File docs/examples/theme/theme.css created.
File docs/examples/tooltip-viewport/tooltip-viewport.css created.

Running "cssflip:rtl" (cssflip) task
File "dist/css/bootstrap-rtl.css" created.

Running "usebanner:files" (usebanner) task
✔ grunt-banner completed successfully

Running "csscomb:dist" (csscomb) task
>> Using custom config file "less/.csscomb.json"...
>> Sorting file "dist/css/bootstrap-rtl.css"...
>> Sorting file "dist/css/bootstrap-theme.css"...
>> Sorting file "dist/css/bootstrap.css"...

Running "csscomb:examples" (csscomb) task
>> Using custom config file "less/.csscomb.json"...
>> Sorting file "docs/examples/blog/blog.css"...
>> Sorting file "docs/examples/carousel/carousel.css"...
>> Sorting file "docs/examples/cover/cover.css"...
>> Sorting file "docs/examples/dashboard/dashboard.css"...
>> Sorting file "docs/examples/equal-height-columns/equal-height-columns.css"...
>> Sorting file "docs/examples/grid/grid.css"...
>> Sorting file "docs/examples/jumbotron-narrow/jumbotron-narrow.css"...
>> Sorting file "docs/examples/jumbotron/jumbotron.css"...
>> Sorting file "docs/examples/justified-nav/justified-nav.css"...
>> Sorting file "docs/examples/navbar-fixed-top/navbar-fixed-top.css"...
>> Sorting file "docs/examples/navbar-static-top/navbar-static-top.css"...
>> Sorting file "docs/examples/navbar/navbar.css"...
>> Sorting file "docs/examples/non-responsive/non-responsive.css"...
>> Sorting file "docs/examples/offcanvas/offcanvas.css"...
>> Sorting file "docs/examples/rtl/rtl.css"...
>> Sorting file "docs/examples/signin/signin.css"...
>> Sorting file "docs/examples/starter-template/starter-template.css"...
>> Sorting file "docs/examples/sticky-footer-navbar/sticky-footer-navbar.css"...
>> Sorting file "docs/examples/sticky-footer/sticky-footer.css"...
>> Sorting file "docs/examples/theme/theme.css"...
>> Sorting file "docs/examples/tooltip-viewport/tooltip-viewport.css"...

Running "csscomb:docs" (csscomb) task
>> Using custom config file "less/.csscomb.json"...
>> Sorting file "docs/assets/css/_src/docs.css"...

Running "less:minify" (less) task
File dist/css/bootstrap.min.css created: 129.95 kB → 107.58 kB
File dist/css/bootstrap-rtl.min.css created: 130.08 kB → 107.71 kB
File dist/css/bootstrap-theme.min.css created: 19.7 kB → 17.75 kB

Running "cssmin:docs" (cssmin) task
File docs/assets/css/docs.min.css created: 31.18 kB → 20.1 kB

Running "csslint:src" (csslint) task
>> 2 files lint free.

Running "csslint:examples" (csslint) task
>> 21 files lint free.

Running "csslint:docs" (csslint) task
>> 1 file lint free.

Running "jshint:grunt" (jshint) task
>> 5 files lint free.

Running "jshint:src" (jshint) task
>> 12 files lint free.

Running "jshint:test" (jshint) task
>> 12 files lint free.

Running "jshint:assets" (jshint) task
>> 5 files lint free.

Running "jscs:grunt" (jscs) task
>> 5 files without code style errors.

Running "jscs:src" (jscs) task
Missing space after `return` keyword at js/affix.js :
    49 |    if (!this.$element.is(':visible')) return
    50 |
    51 |    var scrollHeight = $(document).height()
------------^
    52 |    var scrollTop    = this.$window.scrollTop()
    53 |    var position     = this.$element.offset()
Missing space after `return` keyword at js/affix.js :
    65 |
    66 |    if (this.affixed === affix) return
    67 |    if (this.unpin != null) this.$element.css('top', '')
------------^
    68 |
    69 |    var affixType = 'affix' + (affix ? '-' + affix : '')
Missing space after `return` keyword at js/affix.js :
    74 |    if (e.isDefaultPrevented()) return
    75 |
    76 |    this.affixed = affix
------------^
    77 |    this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null
    78 |
Missing space after `return` keyword at js/alert.js :
    40 |    if (e.isDefaultPrevented()) return
    41 |
    42 |    $parent.removeClass('in')
------------^
    43 |
    44 |    function removeElement() {
Missing space after `return` keyword at js/carousel.js :
    60 |    if (pos > (this.$items.length - 1) || pos < 0) return
    61 |
    62 |    if (this.sliding)       return this.$element.one('slid.bs.carousel', function () { that.to(pos) }) // yes, "slid"
------------^
    63 |    if (activeIndex == pos) return this.pause().cycle()
    64 |
Missing space after `return` keyword at js/carousel.js :
    81 |  Carousel.prototype.next = function () {
    82 |    if (this.sliding) return
    83 |    return this.slide('next')
------------^
    84 |  }
    85 |
Missing space after `return` keyword at js/carousel.js :
    86 |  Carousel.prototype.prev = function () {
    87 |    if (this.sliding) return
    88 |    return this.slide('prev')
------------^
    89 |  }
    90 |
Missing space after `return` keyword at js/carousel.js :
    99 |    if (!$next.length) {
   100 |      if (!this.options.wrap) return
   101 |      $next = this.$element.find('.item')[fallback]()
--------------^
   102 |    }
   103 |
Missing space after `return` keyword at js/carousel.js :
   109 |    if (slideEvent.isDefaultPrevented()) return
   110 |
   111 |    this.sliding = true
------------^
   112 |
   113 |    isCycling && this.pause()
Missing space after `return` keyword at js/collapse.js :
    35 |    if (this.transitioning || this.$element.hasClass('in')) return
    36 |
    37 |    var startEvent = $.Event('show.bs.collapse')
------------^
    38 |    this.$element.trigger(startEvent)
    39 |    if (startEvent.isDefaultPrevented()) return
Missing space after `return` keyword at js/collapse.js :
    39 |    if (startEvent.isDefaultPrevented()) return
    40 |
    41 |    var actives = this.$parent && this.$parent.find('> .panel > .in')
------------^
    42 |
    43 |    if (actives && actives.length) {
Missing space after `return` keyword at js/collapse.js :
    44 |      var hasData = actives.data('bs.collapse')
    45 |      if (hasData && hasData.transitioning) return
    46 |      Plugin.call(actives, 'hide')
--------------^
    47 |      hasData || actives.data('bs.collapse', null)
    48 |    }
Missing space after `return` keyword at js/collapse.js :
    61 |          .one($.support.transition.end, $.proxy(complete, this))
    62 |        return
    63 |      }
--------------^
    64 |      this.$element
    65 |        .removeClass('collapsing')
Missing space after `return` keyword at js/collapse.js :
    83 |    if (this.transitioning || !this.$element.hasClass('in')) return
    84 |
    85 |    var startEvent = $.Event('hide.bs.collapse')
------------^
    86 |    this.$element.trigger(startEvent)
    87 |    if (startEvent.isDefaultPrevented()) return
Missing space after `return` keyword at js/collapse.js :
    87 |    if (startEvent.isDefaultPrevented()) return
    88 |
    89 |    var dimension = this.dimension()
------------^
    90 |
    91 |    this.$element[dimension](this.$element[dimension]())[0].offsetHeight
Missing space after `return` keyword at js/collapse.js :
   103 |          .one($.support.transition.end, $.proxy(complete, this))
   104 |        return
   105 |      }
--------------^
   106 |      this.transitioning = 0
   107 |      this.$element
Missing space after `return` keyword at js/dropdown.js :
    25 |    if ($this.is('.disabled, :disabled')) return
    26 |
    27 |    var $parent  = getParent($this)
------------^
    28 |    var isActive = $parent.hasClass('open')
    29 |
Missing space after `return` keyword at js/dropdown.js :
    41 |      if (e.isDefaultPrevented()) return
    42 |
    43 |      $this.trigger('focus')
--------------^
    44 |
    45 |      $parent
Missing space after `return` keyword at js/dropdown.js :
    54 |    if (!/(38|40|27)/.test(e.keyCode)) return
    55 |
    56 |    var $this = $(this)
------------^
    57 |
    58 |    e.preventDefault()
Missing space after `return` keyword at js/dropdown.js :
    61 |    if ($this.is('.disabled, :disabled')) return
    62 |
    63 |    var $parent  = getParent($this)
------------^
    64 |    var isActive = $parent.hasClass('open')
    65 |
Missing space after `return` keyword at js/dropdown.js :
    74 |    if (!$items.length) return
    75 |
    76 |    var index = $items.index($items.filter(':focus'))
------------^
    77 |
    78 |    if (e.keyCode == 38 && index > 0)                 index--                        // up
Missing space after `return` keyword at js/dropdown.js :
    85 |  function clearMenus(e) {
    86 |    if (e && e.which === 3) return
    87 |    $(backdrop).remove()
------------^
    88 |    $(toggle).each(function () {
    89 |      var $parent = getParent($(this))
Missing space after `return` keyword at js/dropdown.js :
    90 |      var relatedTarget = { relatedTarget: this }
    91 |      if (!$parent.hasClass('open')) return
    92 |      $parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget))
--------------^
    93 |      if (e.isDefaultPrevented()) return
    94 |      $parent.removeClass('open').trigger('hidden.bs.dropdown', relatedTarget)
Missing space after `return` keyword at js/dropdown.js :
    92 |      $parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget))
    93 |      if (e.isDefaultPrevented()) return
    94 |      $parent.removeClass('open').trigger('hidden.bs.dropdown', relatedTarget)
--------------^
    95 |    })
    96 |  }
Missing space after `return` keyword at js/modal.js :
    49 |    if (this.isShown || e.isDefaultPrevented()) return
    50 |
    51 |    this.isShown = true
------------^
    52 |
    53 |    this.checkScrollbar()
Missing space after `return` keyword at js/modal.js :
   101 |    if (!this.isShown || e.isDefaultPrevented()) return
   102 |
   103 |    this.isShown = false
------------^
   104 |
   105 |    this.$body.removeClass('modal-open')
Missing space after `return` keyword at js/modal.js :
   167 |      this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) {
   168 |        if (e.target !== e.currentTarget) return
   169 |        this.options.backdrop == 'static'
----------------^
   170 |          ? this.$element[0].focus.call(this.$element[0])
   171 |          : this.hide.call(this)
Missing space after `return` keyword at js/modal.js :
   178 |      if (!callback) return
   179 |
   180 |      doAnimate ?
--------------^
   181 |        this.$backdrop
   182 |          .one($.support.transition.end, callback)
Missing space after `return` keyword at js/modal.js :
   204 |  Modal.prototype.checkScrollbar = function () {
   205 |    if (document.body.clientWidth >= window.innerWidth) return
   206 |    this.scrollbarWidth = this.scrollbarWidth || this.measureScrollbar()
------------^
   207 |  }
   208 |
Missing space after `return` keyword at js/popover.js :
    90 |
    91 |      if (!data && option == 'destroy') return
    92 |      if (!data) $this.data('bs.popover', (data = new Popover(this, options)))
--------------^
    93 |      if (typeof option == 'string') data[option]()
    94 |    })
Missing space after `return` keyword at js/tab.js :
    30 |    if ($this.parent('li').hasClass('active')) return
    31 |
    32 |    var previous = $ul.find('.active:last a')[0]
------------^
    33 |    var e        = $.Event('show.bs.tab', {
    34 |      relatedTarget: previous
Missing space after `return` keyword at js/tab.js :
    39 |    if (e.isDefaultPrevented()) return
    40 |
    41 |    var $target = $(selector)
------------^
    42 |
    43 |    this.activate($this.parent('li'), $ul)
Missing space after `return` keyword at js/tooltip.js :
   145 |
   146 |      if (e.isDefaultPrevented()) return
   147 |      var that = this;
--------------^
   148 |
   149 |      var $tip = this.tip()
Missing space after `return` keyword at js/tooltip.js :
   281 |    if (e.isDefaultPrevented()) return
   282 |
   283 |    $tip.removeClass('in')
------------^
   284 |
   285 |    $.support.transition && this.$tip.hasClass('fade') ?
Missing space after `return` keyword at js/tooltip.js :
   420 |
   421 |      if (!data && option == 'destroy') return
   422 |      if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))
--------------^
   423 |      if (typeof option == 'string') data[option]()
   424 |    })
>> 35 code style errors found!
Warning: Task "jscs:src" failed. Use --force to continue.

Aborted due to warnings.


Execution Time (2014-05-05 16:12:13 UTC)
less:compileCore        1.7s  ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 16%
less:compileTheme      154ms  ▇▇▇ 1%
autoprefixer:core      863ms  ▇▇▇▇▇▇▇▇▇▇▇▇ 8%
autoprefixer:theme     171ms  ▇▇▇ 2%
autoprefixer:docs      126ms  ▇▇ 1%
autoprefixer:examples  289ms  ▇▇▇▇ 3%
csscomb:dist            2.9s  ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 27%
csscomb:examples       309ms  ▇▇▇▇▇ 3%
csscomb:docs           194ms  ▇▇▇ 2%
less:minify            789ms  ▇▇▇▇▇▇▇▇▇▇▇ 7%
csslint:src            532ms  ▇▇▇▇▇▇▇▇ 5%
jshint:grunt           211ms  ▇▇▇ 2%
jshint:src             764ms  ▇▇▇▇▇▇▇▇▇▇▇ 7%
jshint:test            766ms  ▇▇▇▇▇▇▇▇▇▇▇ 7%
jshint:assets          177ms  ▇▇▇ 2%
jscs:grunt             321ms  ▇▇▇▇▇ 3%
jscs:src               185ms  ▇▇▇ 2%
Total 10.8s

Anyone have solution for this? Or is there something wrong with my clone?

EDIT: I'm running npm v1.4.9 on Ubuntu 14.04 64bit

Thanks and best regards

Assignee
Assign to
Time tracking