Browse Source

Merge pull request #469 from twbs/disallowMultipleVarDecl

Enable `disallowMultipleVarDecl` JSCS check.
pull/446/head
XhmikosR 11 years ago
parent
commit
3b43da1fc4
  1. 24
      dist/js/ratchet.js
  2. 5
      docs/assets/js/fingerblast.js
  3. 24
      docs/dist/js/ratchet.js
  4. 1
      js/.jscsrc
  5. 4
      js/modals.js
  6. 4
      js/popovers.js
  7. 4
      js/push.js
  8. 4
      js/segmented-controllers.js
  9. 4
      js/sliders.js
  10. 4
      js/toggles.js

24
dist/js/ratchet.js vendored

@ -17,7 +17,9 @@
'use strict';
var findModals = function (target) {
var i, modals = document.querySelectorAll('a');
var i;
var modals = document.querySelectorAll('a');
for (; target && target !== document; target = target.parentNode) {
for (i = modals.length; i--;) {
if (modals[i] === target) {
@ -57,7 +59,9 @@
var popover;
var findPopovers = function (target) {
var i, popovers = document.querySelectorAll('a');
var i;
var popovers = document.querySelectorAll('a');
for (; target && target !== document; target = target.parentNode) {
for (i = popovers.length; i--;) {
if (popovers[i] === target) {
@ -523,7 +527,9 @@
};
var findTarget = function (target) {
var i, toggles = document.querySelectorAll('a');
var i;
var toggles = document.querySelectorAll('a');
for (; target && target !== document; target = target.parentNode) {
for (i = toggles.length; i--;) {
if (toggles[i] === target) {
@ -618,7 +624,9 @@
'use strict';
var getTarget = function (target) {
var i, segmentedControls = document.querySelectorAll('.segmented-control .control-item');
var i;
var segmentedControls = document.querySelectorAll('.segmented-control .control-item');
for (; target && target !== document; target = target.parentNode) {
for (i = segmentedControls.length; i--;) {
if (segmentedControls[i] === target) {
@ -695,7 +703,9 @@
var scrollableArea;
var getSlider = function (target) {
var i, sliders = document.querySelectorAll('.slider > .slide-group');
var i;
var sliders = document.querySelectorAll('.slider > .slide-group');
for (; target && target !== document; target = target.parentNode) {
for (i = sliders.length; i--;) {
if (sliders[i] === target) {
@ -816,7 +826,9 @@
var toggle = false;
var findToggle = function (target) {
var i, toggles = document.querySelectorAll('.toggle');
var i;
var toggles = document.querySelectorAll('.toggle');
for (; target && target !== document; target = target.parentNode) {
for (i = toggles.length; i--;) {
if (toggles[i] === target) {

5
docs/assets/js/fingerblast.js

@ -31,7 +31,10 @@
var deactivate = this.deactivate.bind(this);
function contains (element, ancestor) {
var descendants, index, descendant;
var descendants;
var index;
var descendant;
if ('compareDocumentPosition' in ancestor) {
return !!(ancestor.compareDocumentPosition(element) & 16);
} else if ('contains' in ancestor) {

24
docs/dist/js/ratchet.js vendored

@ -17,7 +17,9 @@
'use strict';
var findModals = function (target) {
var i, modals = document.querySelectorAll('a');
var i;
var modals = document.querySelectorAll('a');
for (; target && target !== document; target = target.parentNode) {
for (i = modals.length; i--;) {
if (modals[i] === target) {
@ -57,7 +59,9 @@
var popover;
var findPopovers = function (target) {
var i, popovers = document.querySelectorAll('a');
var i;
var popovers = document.querySelectorAll('a');
for (; target && target !== document; target = target.parentNode) {
for (i = popovers.length; i--;) {
if (popovers[i] === target) {
@ -523,7 +527,9 @@
};
var findTarget = function (target) {
var i, toggles = document.querySelectorAll('a');
var i;
var toggles = document.querySelectorAll('a');
for (; target && target !== document; target = target.parentNode) {
for (i = toggles.length; i--;) {
if (toggles[i] === target) {
@ -618,7 +624,9 @@
'use strict';
var getTarget = function (target) {
var i, segmentedControls = document.querySelectorAll('.segmented-control .control-item');
var i;
var segmentedControls = document.querySelectorAll('.segmented-control .control-item');
for (; target && target !== document; target = target.parentNode) {
for (i = segmentedControls.length; i--;) {
if (segmentedControls[i] === target) {
@ -695,7 +703,9 @@
var scrollableArea;
var getSlider = function (target) {
var i, sliders = document.querySelectorAll('.slider > .slide-group');
var i;
var sliders = document.querySelectorAll('.slider > .slide-group');
for (; target && target !== document; target = target.parentNode) {
for (i = sliders.length; i--;) {
if (sliders[i] === target) {
@ -816,7 +826,9 @@
var toggle = false;
var findToggle = function (target) {
var i, toggles = document.querySelectorAll('.toggle');
var i;
var toggles = document.querySelectorAll('.toggle');
for (; target && target !== document; target = target.parentNode) {
for (i = toggles.length; i--;) {
if (toggles[i] === target) {

1
js/.jscsrc

@ -4,6 +4,7 @@
"disallowLeftStickedOperators": ["?", "/", "*", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="],
"disallowMixedSpacesAndTabs": true,
"disallowMultipleLineStrings": true,
"disallowMultipleVarDecl": true,
"disallowRightStickedOperators": ["?", "/", "*", ":", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="],
"disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"],
"disallowSpaceBeforePostfixUnaryOperators": ["++", "--"],

4
js/modals.js

@ -8,7 +8,9 @@
'use strict';
var findModals = function (target) {
var i, modals = document.querySelectorAll('a');
var i;
var modals = document.querySelectorAll('a');
for (; target && target !== document; target = target.parentNode) {
for (i = modals.length; i--;) {
if (modals[i] === target) {

4
js/popovers.js

@ -10,7 +10,9 @@
var popover;
var findPopovers = function (target) {
var i, popovers = document.querySelectorAll('a');
var i;
var popovers = document.querySelectorAll('a');
for (; target && target !== document; target = target.parentNode) {
for (i = popovers.length; i--;) {
if (popovers[i] === target) {

4
js/push.js

@ -392,7 +392,9 @@
};
var findTarget = function (target) {
var i, toggles = document.querySelectorAll('a');
var i;
var toggles = document.querySelectorAll('a');
for (; target && target !== document; target = target.parentNode) {
for (i = toggles.length; i--;) {
if (toggles[i] === target) {

4
js/segmented-controllers.js

@ -8,7 +8,9 @@
'use strict';
var getTarget = function (target) {
var i, segmentedControls = document.querySelectorAll('.segmented-control .control-item');
var i;
var segmentedControls = document.querySelectorAll('.segmented-control .control-item');
for (; target && target !== document; target = target.parentNode) {
for (i = segmentedControls.length; i--;) {
if (segmentedControls[i] === target) {

4
js/sliders.js

@ -23,7 +23,9 @@
var scrollableArea;
var getSlider = function (target) {
var i, sliders = document.querySelectorAll('.slider > .slide-group');
var i;
var sliders = document.querySelectorAll('.slider > .slide-group');
for (; target && target !== document; target = target.parentNode) {
for (i = sliders.length; i--;) {
if (sliders[i] === target) {

4
js/toggles.js

@ -13,7 +13,9 @@
var toggle = false;
var findToggle = function (target) {
var i, toggles = document.querySelectorAll('.toggle');
var i;
var toggles = document.querySelectorAll('.toggle');
for (; target && target !== document; target = target.parentNode) {
for (i = toggles.length; i--;) {
if (toggles[i] === target) {

Loading…
Cancel
Save