Browse Source

Enable `disallowMultipleVarDecl` JSCS check.

pull/469/head
XhmikosR 11 years ago
parent
commit
42f5042d54
  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'; 'use strict';
var findModals = function (target) { 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 (; target && target !== document; target = target.parentNode) {
for (i = modals.length; i--;) { for (i = modals.length; i--;) {
if (modals[i] === target) { if (modals[i] === target) {
@ -57,7 +59,9 @@
var popover; var popover;
var findPopovers = function (target) { 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 (; target && target !== document; target = target.parentNode) {
for (i = popovers.length; i--;) { for (i = popovers.length; i--;) {
if (popovers[i] === target) { if (popovers[i] === target) {
@ -523,7 +527,9 @@
}; };
var findTarget = function (target) { 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 (; target && target !== document; target = target.parentNode) {
for (i = toggles.length; i--;) { for (i = toggles.length; i--;) {
if (toggles[i] === target) { if (toggles[i] === target) {
@ -618,7 +624,9 @@
'use strict'; 'use strict';
var getTarget = function (target) { 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 (; target && target !== document; target = target.parentNode) {
for (i = segmentedControls.length; i--;) { for (i = segmentedControls.length; i--;) {
if (segmentedControls[i] === target) { if (segmentedControls[i] === target) {
@ -695,7 +703,9 @@
var scrollableArea; var scrollableArea;
var getSlider = function (target) { 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 (; target && target !== document; target = target.parentNode) {
for (i = sliders.length; i--;) { for (i = sliders.length; i--;) {
if (sliders[i] === target) { if (sliders[i] === target) {
@ -816,7 +826,9 @@
var toggle = false; var toggle = false;
var findToggle = function (target) { 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 (; target && target !== document; target = target.parentNode) {
for (i = toggles.length; i--;) { for (i = toggles.length; i--;) {
if (toggles[i] === target) { if (toggles[i] === target) {

5
docs/assets/js/fingerblast.js

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

24
docs/dist/js/ratchet.js vendored

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

1
js/.jscsrc

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

4
js/modals.js

@ -8,7 +8,9 @@
'use strict'; 'use strict';
var findModals = function (target) { 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 (; target && target !== document; target = target.parentNode) {
for (i = modals.length; i--;) { for (i = modals.length; i--;) {
if (modals[i] === target) { if (modals[i] === target) {

4
js/popovers.js

@ -10,7 +10,9 @@
var popover; var popover;
var findPopovers = function (target) { 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 (; target && target !== document; target = target.parentNode) {
for (i = popovers.length; i--;) { for (i = popovers.length; i--;) {
if (popovers[i] === target) { if (popovers[i] === target) {

4
js/push.js

@ -392,7 +392,9 @@
}; };
var findTarget = function (target) { 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 (; target && target !== document; target = target.parentNode) {
for (i = toggles.length; i--;) { for (i = toggles.length; i--;) {
if (toggles[i] === target) { if (toggles[i] === target) {

4
js/segmented-controllers.js

@ -8,7 +8,9 @@
'use strict'; 'use strict';
var getTarget = function (target) { 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 (; target && target !== document; target = target.parentNode) {
for (i = segmentedControls.length; i--;) { for (i = segmentedControls.length; i--;) {
if (segmentedControls[i] === target) { if (segmentedControls[i] === target) {

4
js/sliders.js

@ -23,7 +23,9 @@
var scrollableArea; var scrollableArea;
var getSlider = function (target) { 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 (; target && target !== document; target = target.parentNode) {
for (i = sliders.length; i--;) { for (i = sliders.length; i--;) {
if (sliders[i] === target) { if (sliders[i] === target) {

4
js/toggles.js

@ -13,7 +13,9 @@
var toggle = false; var toggle = false;
var findToggle = function (target) { 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 (; target && target !== document; target = target.parentNode) {
for (i = toggles.length; i--;) { for (i = toggles.length; i--;) {
if (toggles[i] === target) { if (toggles[i] === target) {

Loading…
Cancel
Save