Commit 9488bd58 authored by Chris Rebert's avatar Chris Rebert
Browse files

Merge pull request #13867 from hnrch02/remove-depreacted-jscs-rules

Remove deprecated JSCS rules
parents a33f6f89 f983e494
Showing with 799 additions and 515 deletions
+799 -515
...@@ -233,7 +233,7 @@ window.onload = function () { // wait for load in a dumb way because B-0 ...@@ -233,7 +233,7 @@ window.onload = function () { // wait for load in a dumb way because B-0
if (('variables.less' === filename) && vars) lessSource += generateCustomLess(vars) if (('variables.less' === filename) && vars) lessSource += generateCustomLess(vars)
}) })
lessSource = lessSource.replace(/@import[^\n]*/gi, '') //strip any imports lessSource = lessSource.replace(/@import[^\n]*/gi, '') // strip any imports
return lessSource return lessSource
} }
......
{ {
"disallowEmptyBlocks": true, "disallowEmptyBlocks": true,
"disallowKeywords": ["with"], "disallowKeywords": ["with"],
"disallowLeftStickedOperators": ["?", "/", "*", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="],
"disallowMixedSpacesAndTabs": true, "disallowMixedSpacesAndTabs": true,
"disallowMultipleLineStrings": true, "disallowMultipleLineStrings": true,
"disallowMultipleVarDecl": true, "disallowMultipleVarDecl": true,
"disallowQuotedKeysInObjects": "allButReserved", "disallowQuotedKeysInObjects": "allButReserved",
"disallowRightStickedOperators": ["?", "/", "*", ":", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="], "disallowSpaceAfterPrefixUnaryOperators": ["!"],
"disallowSpaceBeforeBinaryOperators": [","],
"disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"], "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"],
"disallowSpaceBeforePostfixUnaryOperators": ["++", "--"], "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"],
"disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true }, "disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true },
...@@ -17,13 +17,13 @@ ...@@ -17,13 +17,13 @@
"requireCapitalizedConstructors": true, "requireCapitalizedConstructors": true,
"requireCommaBeforeLineBreak": true, "requireCommaBeforeLineBreak": true,
"requireDotNotation": true, "requireDotNotation": true,
"requireLeftStickedOperators": [","],
"requireLineFeedAtFileEnd": true, "requireLineFeedAtFileEnd": true,
"requireRightStickedOperators": ["!"],
"requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", "<", ">=", "<="], "requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", "<", ">=", "<="],
"requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch"], "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch"],
"requireSpaceAfterLineComment": true,
"requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", "<", ">=", "<="], "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", "<", ">=", "<="],
"requireSpacesInAnonymousFunctionExpression": { "beforeOpeningCurlyBrace": true, "beforeOpeningRoundBrace": true }, "requireSpacesInAnonymousFunctionExpression": { "beforeOpeningCurlyBrace": true, "beforeOpeningRoundBrace": true },
"requireSpacesInConditionalExpression": true,
"requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true }, "requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true },
"requireSpacesInFunctionExpression": { "beforeOpeningCurlyBrace": true }, "requireSpacesInFunctionExpression": { "beforeOpeningCurlyBrace": true },
"requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true }, "requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true },
......
...@@ -202,7 +202,7 @@ ...@@ -202,7 +202,7 @@
$(document).on('click.bs.carousel.data-api', '[data-slide], [data-slide-to]', function (e) { $(document).on('click.bs.carousel.data-api', '[data-slide], [data-slide-to]', function (e) {
var href var href
var $this = $(this) var $this = $(this)
var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7 var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) // strip for ie7
var options = $.extend({}, $target.data(), $this.data()) var options = $.extend({}, $target.data(), $this.data())
var slideIndex = $this.attr('data-slide-to') var slideIndex = $this.attr('data-slide-to')
if (slideIndex) options.interval = false if (slideIndex) options.interval = false
......
...@@ -156,7 +156,7 @@ ...@@ -156,7 +156,7 @@
var $this = $(this) var $this = $(this)
var target = $this.attr('data-target') var target = $this.attr('data-target')
|| e.preventDefault() || e.preventDefault()
|| (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7 || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7
var $target = $(target) var $target = $(target)
var data = $target.data('bs.collapse') var data = $target.data('bs.collapse')
var option = data ? 'toggle' : $this.data() var option = data ? 'toggle' : $this.data()
......
...@@ -106,7 +106,7 @@ ...@@ -106,7 +106,7 @@
if (!selector) { if (!selector) {
selector = $this.attr('href') selector = $this.attr('href')
selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7 selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
} }
var $parent = selector && $(selector) var $parent = selector && $(selector)
......
...@@ -267,13 +267,13 @@ ...@@ -267,13 +267,13 @@
$(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (e) { $(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (e) {
var $this = $(this) var $this = $(this)
var href = $this.attr('href') var href = $this.attr('href')
var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) //strip for ie7 var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) // strip for ie7
var option = $target.data('bs.modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data()) var option = $target.data('bs.modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
if ($this.is('a')) e.preventDefault() if ($this.is('a')) e.preventDefault()
$target.one('show.bs.modal', function (showEvent) { $target.one('show.bs.modal', function (showEvent) {
if (showEvent.isDefaultPrevented()) return // only register focus restorer if modal will actually get shown if (showEvent.isDefaultPrevented()) return // only register focus restorer if modal will actually get shown
$target.one('hidden.bs.modal', function () { $target.one('hidden.bs.modal', function () {
$this.is(':visible') && $this.trigger('focus') $this.is(':visible') && $this.trigger('focus')
}) })
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
if (!selector) { if (!selector) {
selector = $this.attr('href') selector = $this.attr('href')
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7 selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
} }
if ($this.parent('li').hasClass('active')) return if ($this.parent('li').hasClass('active')) return
......
This diff is collapsed.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment