From 818658cc9c1505f635cc3166ed1fad837b1d29a4 Mon Sep 17 00:00:00 2001 From: Peter deHaan Date: Mon, 16 Jan 2017 14:25:25 -0800 Subject: [PATCH] Add ESLint promise plugin --- .eslintrc.js | 14 ++++++++++++++ package.json | 1 + 2 files changed, 15 insertions(+) diff --git a/.eslintrc.js b/.eslintrc.js index 1c40e94..a958899 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -8,12 +8,26 @@ module.exports = { "extends": [ "eslint:recommended" ], + "plugins": [ + "promise" + ], "root": true, "rules": { + "promise/always-return": "off", + "promise/avoid-new": "off", + "promise/catch-or-return": "error", + "promise/no-callback-in-promise": "warn", + "promise/no-native": "off", + "promise/no-nesting": "warn", + "promise/no-promise-in-callback": "warn", + "promise/no-return-wrap": "error", + "promise/param-names": "error", + "eqeqeq": "error", "indent": ["error", 2], "linebreak-style": ["error", "unix"], "no-throw-literal": "error", + "no-warning-comments": "warn", "quotes": ["error", "double"], "radix": "error", "semi": ["error", "always"] diff --git a/package.json b/package.json index 441cb13..c8dcdf6 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ "devDependencies": { "addons-linter": "^0.15.14", "eslint": "^3.12.2", + "eslint-plugin-promise": "^3.4.0", "jpm": "^1.2.2", "npm-run-all": "^4.0.0" },