Bug 1515877 - Turn on ESLint in mailnews - move more-specific rules into mailnews/extensions/newsblog. r=aceman
authorGeoff Lankow <geoff@darktrojan.net>
Fri, 21 Dec 2018 22:12:14 +1300
changeset 34051 6ac307a0fdf91d00e40fb6ca598db63b84292118
parent 34050 c707d32abbd64c2eb7619c821ae4997795f4b510
child 34052 691b074060a481d0aa2fff1a3f438b4de783c875
push id389
push userclokep@gmail.com
push dateMon, 18 Mar 2019 19:01:53 +0000
reviewersaceman
bugs1515877
Bug 1515877 - Turn on ESLint in mailnews - move more-specific rules into mailnews/extensions/newsblog. r=aceman
mailnews/.eslintrc.js
mailnews/extensions/newsblog/.eslintrc.js
deleted file mode 100644
--- a/mailnews/.eslintrc.js
+++ /dev/null
@@ -1,33 +0,0 @@
-"use strict";
-
-module.exports = {
-  "globals": {
-    "Log4Moz": true,
-    "MailServices": true,
-    "MsgHdrToMimeMessage": true,
-    "ReloadMessage": true,
-    "Services": true,
-    "gDBView": true,
-    "getBrowser": true,
-  },
-
-  "rules": {
-    // Require braces around blocks that start a new line.
-    "curly": ["error", "multi-line"],
-
-    // Enforce valid JSDoc comments.
-    "valid-jsdoc": ["error", {
-      prefer: { return: "returns" },
-      preferType: {
-        "boolean": "Boolean",
-        "string": "String",
-        "number": "Number",
-        "object": "Object",
-        "function": "Function",
-        "map": "Map",
-        "set": "Set",
-        "date": "Date",
-      },
-    }],
-  },
-};
--- a/mailnews/extensions/newsblog/.eslintrc.js
+++ b/mailnews/extensions/newsblog/.eslintrc.js
@@ -3,18 +3,43 @@
 module.exports = {
   "globals": {
     "Feed": true,
     "FeedEnclosure": true,
     "FeedItem": true,
     "FeedParser": true,
     "FeedUtils": true,
     "GetNumSelectedMessages": true,
+    "Log4Moz": true,
+    "MailServices": true,
+    "MsgHdrToMimeMessage": true,
+    "ReloadMessage": true,
+    "Services": true,
+    "gDBView": true,
     "gMessageNotificationBar": true,
+    "getBrowser": true,
     "onCheckItem": true,
     "openContentTab": true,
   },
 
   "rules": {
     // Warn about cyclomatic complexity in functions.
     "complexity": ["error", 70],
+
+    // Require braces around blocks that start a new line.
+    "curly": ["error", "multi-line"],
+
+    // Enforce valid JSDoc comments.
+    "valid-jsdoc": ["error", {
+      prefer: { return: "returns" },
+      preferType: {
+        "boolean": "Boolean",
+        "string": "String",
+        "number": "Number",
+        "object": "Object",
+        "function": "Function",
+        "map": "Map",
+        "set": "Set",
+        "date": "Date",
+      },
+    }],
   },
 };