[Pkg-javascript-commits] [less.js] 07/14: laxbreak

Jonas Smedegaard dr at jones.dk
Mon Oct 26 23:29:16 UTC 2015


This is an automated email from the git hooks/post-receive script.

js pushed a commit to annotated tag v2.3.1
in repository less.js.

commit dc703deaf0a81c20cb9e3c08f1f41eaa246b5593
Author: Luke Page <luke.a.page at gmail.com>
Date:   Tue Jan 27 22:02:05 2015 +0000

    laxbreak
---
 .jscsrc                              | 18 +++++++++++++++++-
 .jshintrc                            |  1 -
 lib/less/functions/color-blending.js |  6 +++---
 lib/less/functions/color.js          |  6 +++---
 lib/less/tree/mixin-call.js          |  3 +--
 lib/less/tree/rule.js                |  5 ++---
 6 files changed, 26 insertions(+), 13 deletions(-)

diff --git a/.jscsrc b/.jscsrc
index 0634ec2..8c22ade 100644
--- a/.jscsrc
+++ b/.jscsrc
@@ -22,5 +22,21 @@
                               "do",
                               "try",
                               "catch"
-                          ]
+                          ],
+    "requireOperatorBeforeLineBreak": [
+        "?",
+        "=",
+        "+",
+        "-",
+        "/",
+        "*",
+        "==",
+        "===",
+        "!=",
+        "!==",
+        ">",
+        ">=",
+        "<",
+        "<="
+    ]
 }
\ No newline at end of file
diff --git a/.jshintrc b/.jshintrc
index 42606dc..c189e87 100644
--- a/.jshintrc
+++ b/.jshintrc
@@ -1,6 +1,5 @@
 {
     "evil": true,
-    "laxbreak": true,
     "latedef": true,
     "node": true,
     "undef": true,
diff --git a/lib/less/functions/color-blending.js b/lib/less/functions/color-blending.js
index 4d62c9a..cc192b6 100644
--- a/lib/less/functions/color-blending.js
+++ b/lib/less/functions/color-blending.js
@@ -33,9 +33,9 @@ var colorBlendModeFunctions = {
     },
     overlay: function(cb, cs) {
         cb *= 2;
-        return (cb <= 1)
-            ? colorBlendModeFunctions.multiply(cb, cs)
-            : colorBlendModeFunctions.screen(cb - 1, cs);
+        return (cb <= 1) ?
+            colorBlendModeFunctions.multiply(cb, cs) :
+            colorBlendModeFunctions.screen(cb - 1, cs);
     },
     softlight: function(cb, cs) {
         var d = 1, e = cb;
diff --git a/lib/less/functions/color.js b/lib/less/functions/color.js
index 2499dcd..85d0386 100644
--- a/lib/less/functions/color.js
+++ b/lib/less/functions/color.js
@@ -127,9 +127,9 @@ colorFunctions = {
     },
     luminance: function (color) {
         var luminance =
-            (0.2126 * color.rgb[0] / 255)
-                + (0.7152 * color.rgb[1] / 255)
-                + (0.0722 * color.rgb[2] / 255);
+            (0.2126 * color.rgb[0] / 255) +
+                (0.7152 * color.rgb[1] / 255) +
+                (0.0722 * color.rgb[2] / 255);
 
         return new Dimension(luminance * color.alpha * 100, '%');
     },
diff --git a/lib/less/tree/mixin-call.js b/lib/less/tree/mixin-call.js
index c4cf32d..5eecf71 100644
--- a/lib/less/tree/mixin-call.js
+++ b/lib/less/tree/mixin-call.js
@@ -105,8 +105,7 @@ MixinCall.prototype.eval = function (context) {
                 defaultResult = defTrue;
                 if ((count[defTrue] + count[defFalse]) > 1) {
                     throw { type: 'Runtime',
-                        message: 'Ambiguous use of `default()` found when matching for `'
-                            + this.format(args) + '`',
+                        message: 'Ambiguous use of `default()` found when matching for `' + this.format(args) + '`',
                         index: this.index, filename: this.currentFileInfo.filename };
                 }
             }
diff --git a/lib/less/tree/rule.js b/lib/less/tree/rule.js
index 119cbaf..a9ebee0 100644
--- a/lib/less/tree/rule.js
+++ b/lib/less/tree/rule.js
@@ -42,9 +42,8 @@ Rule.prototype.eval = function (context) {
     if (typeof name !== "string") {
         // expand 'primitive' name directly to get
         // things faster (~10% for benchmark.less):
-        name = (name.length === 1)
-            && (name[0] instanceof Keyword)
-                ? name[0].value : evalName(context, name);
+        name = (name.length === 1) && (name[0] instanceof Keyword) ?
+                name[0].value : evalName(context, name);
             variable = false; // never treat expanded interpolation as new variable name
     }
     if (name === "font" && !context.strictMath) {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/less.js.git



More information about the Pkg-javascript-commits mailing list