mozilla / addons-linter

🔍 Firefox Add-ons linter, written in JavaScript. 👁
Mozilla Public License 2.0
314 stars 144 forks source link

Re-add eslint-plugin-promise #4016

Open willdurand opened 2 years ago

willdurand commented 2 years ago

In order to upgrade eslint to v8, we removed the eslint-plugin-promise plugin because it was not compatible. We still want it, though, so let's add it back when it becomes compatible with v8.

Here is the diff used to removed it:

commit cb014b7348ccb7b24b216d91503c7c0a310df95a
Author: William Durand <will+git@drnd.me>
Date:   Tue Nov 2 08:46:15 2021 +0100

    remove eslint-plugin-promise

diff --git a/package-lock.json b/package-lock.json
index 5b8433dc..7a5bdca9 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -64,7 +64,6 @@
         "doctoc": "2.1.0",
         "eslint-config-amo": "5.1.0",
         "eslint-plugin-async-await": "0.0.0",
-        "eslint-plugin-promise": "5.1.1",
         "github-markdown-css": "5.0.0",
         "gunzip-maybe": "1.4.2",
         "hashish": "0.0.4",
@@ -5716,18 +5715,6 @@
         }
       }
     },
-    "node_modules/eslint-plugin-promise": {
-      "version": "5.1.1",
-      "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-5.1.1.tgz",
-      "integrity": "sha512-XgdcdyNzHfmlQyweOPTxmc7pIsS6dE4MvwhXWMQ2Dxs1XAL2GJDilUsjWen6TWik0aSI+zD/PqocZBblcm9rdA==",
-      "dev": true,
-      "engines": {
-        "node": "^10.12.0 || >=12.0.0"
-      },
-      "peerDependencies": {
-        "eslint": "^7.0.0"
-      }
-    },
     "node_modules/eslint-plugin-react": {
       "version": "7.26.1",
       "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.26.1.tgz",
@@ -17322,13 +17309,6 @@
         "prettier-linter-helpers": "^1.0.0"
       }
     },
-    "eslint-plugin-promise": {
-      "version": "5.1.1",
-      "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-5.1.1.tgz",
-      "integrity": "sha512-XgdcdyNzHfmlQyweOPTxmc7pIsS6dE4MvwhXWMQ2Dxs1XAL2GJDilUsjWen6TWik0aSI+zD/PqocZBblcm9rdA==",
-      "dev": true,
-      "requires": {}
-    },
     "eslint-plugin-react": {
       "version": "7.26.1",
       "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.26.1.tgz",
diff --git a/package.json b/package.json
index e64a3119..7f09e4ce 100644
--- a/package.json
+++ b/package.json
@@ -95,7 +95,6 @@
     "doctoc": "2.1.0",
     "eslint-config-amo": "5.1.0",
     "eslint-plugin-async-await": "0.0.0",
-    "eslint-plugin-promise": "5.1.1",
     "github-markdown-css": "5.0.0",
     "gunzip-maybe": "1.4.2",
     "hashish": "0.0.4",
diff --git a/tests/.eslintrc b/tests/.eslintrc
index c2235aa5..5f456ef1 100644
--- a/tests/.eslintrc
+++ b/tests/.eslintrc
@@ -3,17 +3,11 @@
     "jest": true,
     "jest/globals": true,
   },
-  "extends": [
-    "plugin:promise/recommended",
-  ],
   "globals": {
     "assert": true,
     "sinon": true,
   },
-  "plugins": [
-    "jest",
-    "promise",
-  ],
+  "plugins": ["jest"],
   "rules": {
     "import/no-extraneous-dependencies": ["error", {
       // Allow dev-dependencies in this directory.
@@ -28,8 +22,5 @@
         "checkMinNodeVersion",
       ],
     }],
-    "promise/always-return": "off",
-    "promise/avoid-new": "off",
-    "promise/no-nesting": "off",
   },
 }

┆Issue is synchronized with this Jira Task

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. If you think this bug should stay open, please comment on the issue with further details. Thank you for your contributions.