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 33197 6ac307a0fdf9
parent 33196 c707d32abbd6
child 33198 691b074060a4
push id2368
push userclokep@gmail.com
push dateMon, 28 Jan 2019 21:12:50 +0000
treeherdercomm-beta@56d23c07d815 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
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",
+      },
+    }],
   },
 };