From daf554a6246b945294593123c721a5fa51a31e28 Mon Sep 17 00:00:00 2001 From: Ace Nassri Date: Wed, 29 May 2019 15:27:15 -0700 Subject: [PATCH] Add Node 8 standards to linter (#1313) * Add Node 8 standards to linter * Tweak ESLint config * Convert new rules to WARNs --- .eslintrc.yml | 8 +++++++- package.json | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.eslintrc.yml b/.eslintrc.yml index f72d8fcb38..72de1959fa 100644 --- a/.eslintrc.yml +++ b/.eslintrc.yml @@ -2,12 +2,13 @@ extends: - 'eslint:recommended' - 'plugin:node/recommended' - - prettier + - 'prettier' env: mocha: true plugins: - node - prettier + - promise rules: prettier/prettier: error block-scoped-var: error @@ -19,3 +20,8 @@ rules: prefer-const: error no-var: error prefer-arrow-callback: error + no-throw-literal: warn + require-await: warn + promise/prefer-await-to-then: warn + promise/no-nesting: warn + prefer-destructuring: warn \ No newline at end of file diff --git a/package.json b/package.json index 7f44787972..73bc0bd681 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,7 @@ "eslint-config-prettier": "^4.0.0", "eslint-plugin-node": "^9.0.0", "eslint-plugin-prettier": "^3.0.0", + "eslint-plugin-promise": "^4.1.1", "prettier": "^1.15.2" } }