Bug 1616608 - Remove ESLint rules that conflict with Prettier. r=mkmelin
authorGeoff Lankow <geoff@darktrojan.net>
Thu, 20 Feb 2020 11:14:59 +1300
changeset 37399 7c243455ebe5e4bd08075abfe1f0b87a5c15dcf5
parent 37398 d08bc5a011fc3aedb7ae44ab95a027778855267b
child 37400 f61f27a35d891c977792cfdd4b10d1031b5ec10d
push id2566
push userclokep@gmail.com
push dateMon, 09 Mar 2020 19:20:31 +0000
treeherdercomm-beta@a352facfa0a4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmkmelin
bugs1616608
Bug 1616608 - Remove ESLint rules that conflict with Prettier. r=mkmelin
.eslintrc.js
mailnews/extensions/newsblog/.eslintrc.js
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -29,59 +29,27 @@ module.exports = {
   extends: ["plugin:mozilla/recommended"],
 
   // When adding items to this file please check for effects on sub-directories.
   plugins: ["html", "mozilla"],
 
   rules: {
     "func-names": ["error", "never"],
     "mozilla/prefer-boolean-length-check": "off",
-    "no-multi-spaces": [
-      "error",
-      {
-        exceptions: {
-          ArrayExpression: true,
-          AssignmentExpression: true,
-          ObjectExpression: true,
-          VariableDeclarator: true,
-        },
-        ignoreEOLComments: true,
-      },
-    ],
-    "semi-spacing": ["error", { before: false, after: true }],
-    "space-in-parens": ["error", "never"],
-    curly: ["error", "all"],
-
-    // Use brace-style because Prettier covers most brace issues but not this:
-    //
-    //     }
-    //     // a comment
-    //     else {
-    //
-    // Allow single line for inline JS in XUL files.
-    "brace-style": ["error", "1tbs", { allowSingleLine: true }],
   },
 
   // To avoid bad interactions of the html plugin with the xml preprocessor in
   // eslint-plugin-mozilla, we turn off processing of the html plugin for .xml
   // files.
   settings: {
     "html/xml-extensions": [".xhtml"],
   },
 
   overrides: [
     {
-      // eslint-plugin-html handles eol-last slightly different - it applies to
-      // each set of script tags, so we turn it off here.
-      files: "**/*.*html",
-      rules: {
-        "eol-last": "off",
-      },
-    },
-    {
       files: "**/.eslintrc.js",
       env: {
         node: true,
       },
     },
     {
       ...removeOverrides(xpcshellTestConfig),
       files: xpcshellTestPaths.map(path => `${path}**`),
--- a/mailnews/extensions/newsblog/.eslintrc.js
+++ b/mailnews/extensions/newsblog/.eslintrc.js
@@ -19,19 +19,16 @@ module.exports = {
     onCheckItem: true,
     openContentTab: true,
   },
 
   rules: {
     // Warn about cyclomatic complexity in functions.
     complexity: ["error", 80],
 
-    // 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",