Add ESLint promise plugin
This commit is contained in:
parent
3009e855ae
commit
818658cc9c
2 changed files with 15 additions and 0 deletions
14
.eslintrc.js
14
.eslintrc.js
|
@ -8,12 +8,26 @@ module.exports = {
|
||||||
"extends": [
|
"extends": [
|
||||||
"eslint:recommended"
|
"eslint:recommended"
|
||||||
],
|
],
|
||||||
|
"plugins": [
|
||||||
|
"promise"
|
||||||
|
],
|
||||||
"root": true,
|
"root": true,
|
||||||
"rules": {
|
"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",
|
"eqeqeq": "error",
|
||||||
"indent": ["error", 2],
|
"indent": ["error", 2],
|
||||||
"linebreak-style": ["error", "unix"],
|
"linebreak-style": ["error", "unix"],
|
||||||
"no-throw-literal": "error",
|
"no-throw-literal": "error",
|
||||||
|
"no-warning-comments": "warn",
|
||||||
"quotes": ["error", "double"],
|
"quotes": ["error", "double"],
|
||||||
"radix": "error",
|
"radix": "error",
|
||||||
"semi": ["error", "always"]
|
"semi": ["error", "always"]
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"addons-linter": "^0.15.14",
|
"addons-linter": "^0.15.14",
|
||||||
"eslint": "^3.12.2",
|
"eslint": "^3.12.2",
|
||||||
|
"eslint-plugin-promise": "^3.4.0",
|
||||||
"jpm": "^1.2.2",
|
"jpm": "^1.2.2",
|
||||||
"npm-run-all": "^4.0.0"
|
"npm-run-all": "^4.0.0"
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Reference in a new issue