Bug 1588872 - Enable ESLint rule mozilla/prefer-boolean-length-check by default, disable for failing locations. r=Mardak
authorMark Banner <standard8@mozilla.com>
Wed, 16 Oct 2019 20:11:31 +0000
changeset 559259 c33ead05e1d851a588ea62b6b1f8d538d24a26ac
parent 559258 28e47f2496117673849e5cc4ad15c0f33afa3dd3
child 559260 4f934e73d44c0c4ee0e09aa5e4d463b435f4f322
push id12175
push userccoroiu@mozilla.com
push dateThu, 17 Oct 2019 19:29:09 +0000
treeherdermozilla-beta@d333b6ef1fd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersMardak
bugs1588872
milestone71.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 1588872 - Enable ESLint rule mozilla/prefer-boolean-length-check by default, disable for failing locations. r=Mardak Differential Revision: https://phabricator.services.mozilla.com/D49437
.eslintrc.js
tools/lint/eslint/eslint-plugin-mozilla/lib/configs/recommended.js
tools/lint/eslint/eslint-plugin-mozilla/package-lock.json
tools/lint/eslint/eslint-plugin-mozilla/package.json
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -352,16 +352,35 @@ module.exports = {
       "no-redeclare": "off",
       "no-sequences": "off",
       "no-shadow": "off",
       "no-unused-vars": "off",
       "no-useless-call": "off",
     }
   }, {
     "files": [
-      "toolkit/**",
-      "browser/**",
+      "accessible/**",
+      "devtools/**",
+      "dom/**",
+      "docshell/**",
+      "editor/libeditor/tests/**",
+      "editor/spellchecker/tests/test_bug338427.html",
+      "gfx/**",
+      "image/test/browser/browser_image.js",
+      "js/src/builtin/**",
+      "layout/**",
+      "mobile/android/**",
+      "modules/**",
+      "netwerk/**",
+      "remote/**",
+      "security/manager/**",
+      "services/**",
+      "storage/test/unit/test_vacuum.js",
+      "taskcluster/docker/periodic-updates/scripts/**",
+      "testing/**",
+      "tools/**",
+      "widget/tests/test_assign_event_data.html",
     ],
     "rules": {
-      "mozilla/prefer-boolean-length-check": "error",
+      "mozilla/prefer-boolean-length-check": "off",
     }
   }]
 };
--- a/tools/lint/eslint/eslint-plugin-mozilla/lib/configs/recommended.js
+++ b/tools/lint/eslint/eslint-plugin-mozilla/lib/configs/recommended.js
@@ -129,16 +129,17 @@ module.exports = {
     "mozilla/avoid-removeChild": "error",
     "mozilla/consistent-if-bracing": "error",
     "mozilla/import-browser-window-globals": "error",
     "mozilla/import-globals": "error",
     "mozilla/no-compare-against-boolean-literals": "error",
     "mozilla/no-define-cc-etc": "error",
     "mozilla/no-useless-parameters": "error",
     "mozilla/no-useless-removeEventListener": "error",
+    "mozilla/prefer-boolean-length-check": "error",
     "mozilla/reject-importGlobalProperties": ["error", "allownonwebidl"],
     "mozilla/rejects-requires-await": "error",
     "mozilla/use-cc-etc": "error",
     "mozilla/use-chromeutils-generateqi": "error",
     "mozilla/use-chromeutils-import": "error",
     "mozilla/use-default-preference-values": "error",
     "mozilla/use-includes-instead-of-indexOf": "error",
     "mozilla/use-ownerGlobal": "error",
--- a/tools/lint/eslint/eslint-plugin-mozilla/package-lock.json
+++ b/tools/lint/eslint/eslint-plugin-mozilla/package-lock.json
@@ -1,11 +1,11 @@
 {
   "name": "eslint-plugin-mozilla",
-  "version": "2.1.0",
+  "version": "2.2.0",
   "lockfileVersion": 1,
   "requires": true,
   "dependencies": {
     "@babel/code-frame": {
       "version": "7.5.5",
       "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz",
       "integrity": "sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw==",
       "dev": true,
--- a/tools/lint/eslint/eslint-plugin-mozilla/package.json
+++ b/tools/lint/eslint/eslint-plugin-mozilla/package.json
@@ -1,11 +1,11 @@
 {
   "name": "eslint-plugin-mozilla",
-  "version": "2.1.0",
+  "version": "2.2.0",
   "description": "A collection of rules that help enforce JavaScript coding standard in the Mozilla project.",
   "keywords": [
     "eslint",
     "eslintplugin",
     "eslint-plugin",
     "mozilla",
     "firefox"
   ],