MDL-79003 eslint: Use 'plugin:promise/recommended'
This commit is a backport of MDL-74301 which should have been backported at the time. This enables recommended rules and brings back related rules. Without reducing level to warn for some of them, this gives numerous (about 88) issues mainly catch-or-return. Recommended set is defined in node_modules/eslint-plugin-promise/index.js
This commit is contained in:
@@ -5,7 +5,8 @@
|
||||
'jsdoc'
|
||||
],
|
||||
'extends': [
|
||||
'eslint:recommended'
|
||||
'eslint:recommended',
|
||||
'plugin:promise/recommended'
|
||||
],
|
||||
'env': {
|
||||
'browser': true,
|
||||
@@ -184,14 +185,12 @@
|
||||
'unicode-bom': 'error',
|
||||
'wrap-regex': 'off',
|
||||
|
||||
// === Promises ===
|
||||
// === Promises (override plugin:promise/recommended) ===
|
||||
'promise/always-return': 'warn',
|
||||
'promise/no-return-wrap': 'warn',
|
||||
'promise/param-names': 'warn',
|
||||
'promise/catch-or-return': ['warn', {terminationMethod: ['catch', 'fail']}],
|
||||
'promise/no-native': 'warn',
|
||||
'promise/no-promise-in-callback': 'warn',
|
||||
'promise/no-callback-in-promise': 'warn',
|
||||
'promise/avoid-new': 'warn',
|
||||
|
||||
// === Deprecations ===
|
||||
|
||||
Reference in New Issue
Block a user