Bug 1554169 - Enable some ESLint rules for more of netwerk/. r=dragana
authorMark Banner <standard8@mozilla.com>
Wed, 29 May 2019 10:50:37 +0000
changeset 476038 10822a2ce5ae48fcc5a994de3e8df5888e41d29a
parent 476037 0b0bb258f531e0ad9d9c6bd6cba539041558e747
child 476039 9dcf4317c50c7efde43107afbcdd93dd85cea14f
push id113243
push usernerli@mozilla.com
push dateWed, 29 May 2019 16:02:35 +0000
treeherdermozilla-inbound@357a1b6e657c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdragana
bugs1554169
milestone69.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1554169 - Enable some ESLint rules for more of netwerk/. r=dragana Differential Revision: https://phabricator.services.mozilla.com/D32495
.eslintignore
.eslintrc.js
--- a/.eslintignore
+++ b/.eslintignore
@@ -10,20 +10,16 @@
 
 # Exclude expected objdirs.
 obj*/**
 
 # We ignore all these directories by default, until we get them enabled.
 # If you are enabling a directory, please add directory specific exclusions
 # below.
 layout/**
-netwerk/cookie/test/browser/**
-netwerk/test/browser/**
-netwerk/test/mochitests/**
-netwerk/test/unit*/**
 
 # We currently have no js files in these directories, so we ignore them by
 # default to aid ESLint's performance.
 build/**
 config/**
 db/**
 embedding/**
 gradle/**
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -188,10 +188,76 @@ module.exports = {
       "no-multi-spaces": "off",
       "no-trailing-spaces": "off",
       "padded-blocks": "off",
       "quotes": "off",
       "semi": "off",
       "space-before-function-paren": "off",
       "space-infix-ops": "off",
     }
+  }, {
+    "files": [
+      "netwerk/cookie/test/browser/**",
+      "netwerk/test/browser/**",
+      "netwerk/test/mochitests/**",
+      "netwerk/test/unit*/**",
+    ],
+    "rules": {
+      "object-shorthand": "off",
+      "mozilla/consistent-if-bracing": "off",
+      "mozilla/reject-importGlobalProperties": "off",
+      "mozilla/no-arbitrary-setTimeout": "off",
+      "mozilla/no-define-cc-etc": "off",
+      "mozilla/no-useless-parameters": "off",
+      "mozilla/no-useless-run-test": "off",
+      "mozilla/use-chromeutils-generateqi": "off",
+      "mozilla/use-chromeutils-import": "off",
+      "mozilla/use-default-preference-values": "off",
+      "mozilla/use-services": "off",
+      "consistent-return": "off",
+      "no-array-constructor": "off",
+      "no-extra-boolean-cast": "off",
+      "no-eval": "off",
+      "no-else-return": "off",
+      "no-global-assign": "off",
+      "no-lonely-if": "off",
+      "no-nested-ternary": "off",
+      "no-new-wrappers": "off",
+      "no-redeclare": "off",
+      "no-return-await": "off",
+      "no-sequences": "off",
+      "no-shadow": "off",
+      "no-throw-literal": "off",
+      "no-undef": "off",
+      "no-unreachable": "off",
+      "no-unused-vars": "off",
+      "no-useless-return": "off",
+
+      // Not enabling the rules below for now pending prettier roll-out.
+      "arrow-spacing": "off",
+      "block-spacing": "off",
+      "brace-style": "off",
+      "comma-dangle": "off",
+      "comma-spacing": "off",
+      "comma-style": "off",
+      "eol-last": "off",
+      "func-call-spacing": "off",
+      "generator-star-spacing": "off",
+      "key-spacing": "off",
+      "keyword-spacing": "off",
+      "no-extra-semi": "off",
+      "no-tabs": "off",
+      "no-mixed-spaces-and-tabs": "off",
+      "no-multi-spaces": "off",
+      "no-trailing-spaces": "off",
+      "no-whitespace-before-property": "off",
+      "padded-blocks": "off",
+      "quotes": "off",
+      "rest-spread-spacing": "off",
+      "semi": "off",
+      "space-before-blocks": "off",
+      "space-before-function-paren": "off",
+      "space-infix-ops": "off",
+      "space-unary-ops": "off",
+      "spaced-comment": "off",
+    }
   }]
 };