From d3fbc25be21719e76907cacfcb0291788c79adc2 Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Fri, 28 Feb 2014 16:43:23 -0800 Subject: style: enable jscs requireRightStickedOperators rule --- .jscs.json | 3 ++- .jscs.json.todo | 1 - src/ng/directive/select.js | 2 +- src/ng/log.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.jscs.json b/.jscs.json index 05d53984..0fc84a66 100644 --- a/.jscs.json +++ b/.jscs.json @@ -1,4 +1,5 @@ { "disallowKeywords": ["with"], - "disallowTrailingWhitespace": true + "disallowTrailingWhitespace": true, + "requireRightStickedOperators": ["!"] } diff --git a/.jscs.json.todo b/.jscs.json.todo index b7e82bc2..96326dce 100644 --- a/.jscs.json.todo +++ b/.jscs.json.todo @@ -8,7 +8,6 @@ "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch"], "disallowLeftStickedOperators": ["?", "+", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="], "disallowRightStickedOperators": ["?", "+", "/", "*", ":", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="], - "requireRightStickedOperators": ["!"], "requireLeftStickedOperators": [","], "disallowImplicitTypeConversion": ["string"], "disallowMultipleLineBreaks": true, diff --git a/src/ng/directive/select.js b/src/ng/directive/select.js index 3846d18a..0b562cca 100644 --- a/src/ng/directive/select.js +++ b/src/ng/directive/select.js @@ -304,7 +304,7 @@ var selectDirective = ['$compile', '$parse', function($compile, $parse) { function setupAsOptions(scope, selectElement, ctrl) { var match; - if (! (match = optionsExp.match(NG_OPTIONS_REGEXP))) { + if (!(match = optionsExp.match(NG_OPTIONS_REGEXP))) { throw ngOptionsMinErr('iexp', "Expected expression in form of " + "'_select_ (as _label_)? for (_key_,)?_value_ in _collection_'" + diff --git a/src/ng/log.js b/src/ng/log.js index f704184a..cf5420ef 100644 --- a/src/ng/log.js +++ b/src/ng/log.js @@ -139,7 +139,7 @@ function $LogProvider(){ // Note: reading logFn.apply throws an error in IE11 in IE8 document mode. // The reason behind this is that console.log has type "object" in IE8... try { - hasApply = !! logFn.apply; + hasApply = !!logFn.apply; } catch (e) {} if (hasApply) { -- cgit v1.2.3