[Pkg-mozext-commits] [itsalltext] 219/459: New lint rules.

David Prévot taffit at moszumanska.debian.org
Tue Feb 24 23:26:23 UTC 2015


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

taffit pushed a commit to branch master
in repository itsalltext.

commit e63ce88977abf93da6cde609c98a0e296f141bb4
Author: Christian Höltje <docwhat at gerf.org>
Date:   Sun Jun 3 21:02:47 2007 -0400

    New lint rules.
---
 src/chrome/content/Color.js      | 48 ++++++++++++++++++++--------------------
 src/chrome/content/badeditor.js  |  1 +
 src/chrome/content/itsalltext.js | 14 ++++++------
 3 files changed, 32 insertions(+), 31 deletions(-)

diff --git a/src/chrome/content/Color.js b/src/chrome/content/Color.js
index bea88a8..1426f1d 100644
--- a/src/chrome/content/Color.js
+++ b/src/chrome/content/Color.js
@@ -20,33 +20,33 @@ var Color = function() {
 
     // CSS 2.1 Colour Keywords
 	var keyword = {
-        "maroon"   : "#800000",
-        "red"      : "#ff0000",
-        "orange"   : "#ffA500",
-        "yellow"   : "#ffff00",
-        "olive"    : "#808000",
-        "purple"   : "#800080",
-        "fuchsia"  : "#ff00ff",
-        "white"    : "#ffffff",
-        "lime"     : "#00ff00",
-        "green"    : "#008000",
-        "navy"     : "#000080",
-        "blue"     : "#0000ff",
-        "aqua"     : "#00ffff",
-        "teal"     : "#008080",
-        "black"    : "#000000",
-        "silver"   : "#c0c0c0",
-        "gray"     : "#808080"
+        maroon   : "#800000",
+        red      : "#ff0000",
+        orange   : "#ffA500",
+        yellow   : "#ffff00",
+        olive    : "#808000",
+        purple   : "#800080",
+        fuchsia  : "#ff00ff",
+        white    : "#ffffff",
+        lime     : "#00ff00",
+        green    : "#008000",
+        navy     : "#000080",
+        blue     : "#0000ff",
+        aqua     : "#00ffff",
+        teal     : "#008080",
+        black    : "#000000",
+        silver   : "#c0c0c0",
+        gray     : "#808080"
     };
 
     // CSS Functional Notations and Hex Patterns
 	var func = {
-        "rgb"   : /^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\);?$/,
+        rgb   : /^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\);?$/,
         "rgb%"  : /^rgb\(\s*(\d{1,3})%\s*,\s*(\d{1,3})%\s*,\s*(\d{1,3})%\s*\);?$/,
-        "rgba"  : /^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*((?:\d+(?:\.\d+)?)|(?:\.\d+))\s*\);?$/,
+        rgba  : /^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*((?:\d+(?:\.\d+)?)|(?:\.\d+))\s*\);?$/,
         "rgba%" : /^rgba\(\s*(\d{1,3})%\s*,\s*(\d{1,3})%\s*,\s*(\d{1,3})%\s*,\s*((?:\d+(?:\.\d+)?)|(?:\.\d+))\s*\);?$/,
-        "hex3"  : /^#([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f]);?$/,
-        "hex6"  : /^#([0-9A-Fa-f]{2})([0-9A-Fa-f]{2})([0-9A-Fa-f]{2});?$/
+        hex3  : /^#([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f]);?$/,
+        hex6  : /^#([0-9A-Fa-f]{2})([0-9A-Fa-f]{2})([0-9A-Fa-f]{2});?$/
     };
 
     /**
@@ -147,9 +147,9 @@ var Color = function() {
         var r, g, b, i;
       
         var step = {
-            "red"   : (alphaBlend(color.red, this.red, color.alpha) - this.red) / steps,
-            "green" : (alphaBlend(color.green, this.green, color.alpha) - this.green) / steps,
-            "blue"  : (alphaBlend(color.blue,  this.blue,  color.alpha) - this.blue) / steps
+            red   : (alphaBlend(color.red, this.red, color.alpha) - this.red) / steps,
+            green : (alphaBlend(color.green, this.green, color.alpha) - this.green) / steps,
+            blue  : (alphaBlend(color.blue,  this.blue,  color.alpha) - this.blue) / steps
         };
         for (i = 0; i < steps + 1; i++) {
             r = Math.round(this.red   + (step.red * i));
diff --git a/src/chrome/content/badeditor.js b/src/chrome/content/badeditor.js
index a96ae28..f0b8b2d 100644
--- a/src/chrome/content/badeditor.js
+++ b/src/chrome/content/badeditor.js
@@ -1,3 +1,4 @@
+/*jslint nomen: true, evil: false, browser: true */
 /**
  * Pass back the values that that the user selected.
  */
diff --git a/src/chrome/content/itsalltext.js b/src/chrome/content/itsalltext.js
index d67c8ca..0d94450 100644
--- a/src/chrome/content/itsalltext.js
+++ b/src/chrome/content/itsalltext.js
@@ -259,13 +259,13 @@ var ItsAllText = function() {
          * @type Hash
          */
         types: {
-            'lastversion':        'Char',
-            'charset':            'Char',
-            'editor':             'Char',
-            'refresh':            'Int',
-            'debug':              'Bool',
-            'disable_gumdrops':   'Bool',
-            'extensions':         'Char'
+            lastversion:        'Char',
+            charset:            'Char',
+            editor:             'Char',
+            refresh:            'Int',
+            debug:              'Bool',
+            disable_gumdrops:   'Bool',
+            extensions:         'Char'
         },
 
         /**

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/itsalltext.git



More information about the Pkg-mozext-commits mailing list