Skip to content

Commit

Permalink
chore: Added promise eslint plugin.
Browse files Browse the repository at this point in the history
chore: Updated deps.
  • Loading branch information
cb1kenobi committed Dec 17, 2018
1 parent 7e3d43b commit 0b1b0db
Show file tree
Hide file tree
Showing 3 changed files with 109 additions and 90 deletions.
67 changes: 40 additions & 27 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -16,40 +16,53 @@
"plugins": [
"chai-expect",
"mocha",
"promise",
"security"
],
"root": true,
"rules": {
"array-bracket-spacing": [ "error", "always", { "objectsInArrays": false, "arraysInArrays": false } ],
"array-bracket-spacing": [ 'warn', 'always' ],
"brace-style": [ 2, "1tbs", { "allowSingleLine": true } ],
"camelcase": 0,
"chai-expect/missing-assertion": 2,
"chai-expect/terminating-properties": 1,
"curly": [ 2, "all" ],
"eol-last": 2,
"indent": [ 2, "tab", { "SwitchCase": 1 } ],
"camelcase": "off",
"chai-expect/missing-assertion": "error",
"chai-expect/terminating-properties": "warn",
"curly": [ "error", "all" ],
"eol-last": "error",
"indent": [ "error", "tab", { "SwitchCase": 1 } ],
"keyword-spacing": [ "error" ],
"linebreak-style": [ 2, "unix" ],
"max-len": [ 2, 200 ],
"no-case-declarations": 0,
"no-cond-assign": 0,
"no-console": 0,
"no-control-regex": 0,
"no-empty": 1,
"no-inner-declarations": 0,
"no-mixed-spaces-and-tabs": 2,
"no-multi-str": 2,
"no-multiple-empty-lines": 2,
"no-trailing-spaces": 2,
"no-unused-vars": 0,
"no-useless-escape": 1,
"quotes": [ 2, "single" ],
"semi": [ 2, "always" ],
"space-before-blocks": [ 2, "always" ],
"linebreak-style": [ "error", "unix" ],
"max-len": [ "error", 200 ],
"no-case-declarations": "off",
"no-cond-assign": "off",
"no-console": "off",
"no-control-regex": "off",
"no-empty": "warn",
"no-inner-declarations": "off",
"no-mixed-spaces-and-tabs": "error",
"no-multi-str": "error",
"no-multiple-empty-lines": "error",
"no-trailing-spaces": "error",
"no-unused-vars": "off",
"no-useless-escape": "warn",
"promise/always-return": "error",
"promise/no-return-wrap": "error",
"promise/param-names": "error",
"promise/catch-or-return": "error",
"promise/no-native": "off",
"promise/no-nesting": "warn",
"promise/no-promise-in-callback": "warn",
"promise/no-callback-in-promise": "warn",
"promise/avoid-new": "warn",
"promise/no-new-statics": "error",
"promise/no-return-in-finally": "warn",
"promise/valid-params": "warn",
"quotes": [ "error", "single" ],
"semi": [ "error", "always" ],
"space-before-blocks": [ "error", "always" ],
"space-before-function-paren": [ "error", { "anonymous": "always", "named": "ignore", "asyncArrow": "always" }],
"space-in-parens": [ "error", "never" ],
"space-infix-ops": 2,
"space-unary-ops": [ 2, { "nonwords": false, "overrides": {} } ],
"valid-jsdoc": [ 1, { "requireReturn": false, "requireReturnDescription": false } ]
"space-infix-ops": "error",
"space-unary-ops": [ "error", { "nonwords": false, "overrides": {} } ],
"valid-jsdoc": [ "warn", { "requireReturn": false, "requireReturnDescription": false } ]
}
}
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@
"dependencies": {
"bryt": "^1.0.0",
"chalk": "^2.4.1",
"nanobuffer": "^1.1.3",
"nanobuffer": "^1.1.4",
"source-map-support": "^0.5.9",
"supports-color": "^5.5.0"
},
"devDependencies": {
"@babel/core": "^7.2.0",
"@babel/core": "^7.2.2",
"@babel/plugin-transform-modules-commonjs": "^7.2.0",
"@babel/register": "^7.0.0",
"ansi-colors": "^3.2.3",
Expand All @@ -46,6 +46,7 @@
"eslint": "^5.10.0",
"eslint-plugin-chai-expect": "^2.0.1",
"eslint-plugin-mocha": "^5.2.0",
"eslint-plugin-promise": "^4.0.1",
"eslint-plugin-security": "^1.4.0",
"fancy-log": "^1.3.3",
"fs-extra": "^7.0.1",
Expand Down
127 changes: 66 additions & 61 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@
dependencies:
"@babel/highlight" "^7.0.0"

"@babel/core@^7.2.0":
version "7.2.0"
resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.2.0.tgz#a4dd3814901998e93340f0086e9867fefa163ada"
integrity sha512-7pvAdC4B+iKjFFp9Ztj0QgBndJ++qaMeonT185wAqUnhipw8idm9Rv1UMyBuKtYjfl6ORNkgEgcsYLfHX/GpLw==
"@babel/core@^7.2.2":
version "7.2.2"
resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.2.2.tgz#07adba6dde27bb5ad8d8672f15fde3e08184a687"
integrity sha512-59vB0RWt09cAct5EIe58+NzGP4TFSD3Bz//2/ELy3ZeTeKF6VTD1AXlH8BGGbCX0PuobZBsIzO7IAI9PH67eKw==
dependencies:
"@babel/code-frame" "^7.0.0"
"@babel/generator" "^7.2.0"
"@babel/generator" "^7.2.2"
"@babel/helpers" "^7.2.0"
"@babel/parser" "^7.2.0"
"@babel/template" "^7.1.2"
"@babel/traverse" "^7.1.6"
"@babel/types" "^7.2.0"
"@babel/parser" "^7.2.2"
"@babel/template" "^7.2.2"
"@babel/traverse" "^7.2.2"
"@babel/types" "^7.2.2"
convert-source-map "^1.1.0"
debug "^4.1.0"
json5 "^2.1.0"
Expand All @@ -29,12 +29,12 @@
semver "^5.4.1"
source-map "^0.5.0"

"@babel/generator@^7.0.0", "@babel/generator@^7.1.6", "@babel/generator@^7.2.0":
version "7.2.0"
resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.2.0.tgz#eaf3821fa0301d9d4aef88e63d4bcc19b73ba16c"
integrity sha512-BA75MVfRlFQG2EZgFYIwyT1r6xSkwfP2bdkY/kLZusEYWiJs4xCowab/alaEaT0wSvmVuXGqiefeBlP+7V1yKg==
"@babel/generator@^7.0.0", "@babel/generator@^7.2.2":
version "7.2.2"
resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.2.2.tgz#18c816c70962640eab42fe8cae5f3947a5c65ccc"
integrity sha512-I4o675J/iS8k+P38dvJ3IBGqObLXyQLTxtrR4u9cSUJOURvafeEWb/pFMOTwtNrmq73mJzyF6ueTbO1BtN0Zeg==
dependencies:
"@babel/types" "^7.2.0"
"@babel/types" "^7.2.2"
jsesc "^2.5.1"
lodash "^4.17.10"
source-map "^0.5.0"
Expand Down Expand Up @@ -64,15 +64,15 @@
"@babel/types" "^7.0.0"

"@babel/helper-module-transforms@^7.1.0":
version "7.1.0"
resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.1.0.tgz#470d4f9676d9fad50b324cdcce5fbabbc3da5787"
integrity sha512-0JZRd2yhawo79Rcm4w0LwSMILFmFXjugG3yqf+P/UsKsRS1mJCmMwwlHDlMg7Avr9LrvSpp4ZSULO9r8jpCzcw==
version "7.2.2"
resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.2.2.tgz#ab2f8e8d231409f8370c883d20c335190284b963"
integrity sha512-YRD7I6Wsv+IHuTPkAmAS4HhY0dkPobgLftHp0cRGZSdrRvmZY8rFvae/GVu3bD00qscuvK3WPHB3YdNpBXUqrA==
dependencies:
"@babel/helper-module-imports" "^7.0.0"
"@babel/helper-simple-access" "^7.1.0"
"@babel/helper-split-export-declaration" "^7.0.0"
"@babel/template" "^7.1.0"
"@babel/types" "^7.0.0"
"@babel/template" "^7.2.2"
"@babel/types" "^7.2.2"
lodash "^4.17.10"

"@babel/helper-plugin-utils@^7.0.0":
Expand Down Expand Up @@ -113,10 +113,10 @@
esutils "^2.0.2"
js-tokens "^4.0.0"

"@babel/parser@^7.0.0", "@babel/parser@^7.1.2", "@babel/parser@^7.1.6", "@babel/parser@^7.2.0":
version "7.2.0"
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.2.0.tgz#02d01dbc330b6cbf36b76ac93c50752c69027065"
integrity sha512-M74+GvK4hn1eejD9lZ7967qAwvqTZayQa3g10ag4s9uewgR7TKjeaT0YMyoq+gVfKYABiWZ4MQD701/t5e1Jhg==
"@babel/parser@^7.0.0", "@babel/parser@^7.2.2":
version "7.2.2"
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.2.2.tgz#37ebdbc88a2e1ebc6c8dd3d35ea9436e3e39e477"
integrity sha512-UNTmQ5cSLDeBGBl+s7JeowkqIHgmFAGBnLDdIzFmUNSuS5JF0XBcN59jsh/vJO/YjfsBqMxhMjoFGmNExmf0FA==

"@babel/plugin-transform-modules-commonjs@^7.2.0":
version "7.2.0"
Expand All @@ -140,34 +140,34 @@
pirates "^4.0.0"
source-map-support "^0.5.9"

"@babel/template@^7.0.0", "@babel/template@^7.1.0", "@babel/template@^7.1.2":
version "7.1.2"
resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.1.2.tgz#090484a574fef5a2d2d7726a674eceda5c5b5644"
integrity sha512-SY1MmplssORfFiLDcOETrW7fCLl+PavlwMh92rrGcikQaRq4iWPVH0MpwPpY3etVMx6RnDjXtr6VZYr/IbP/Ag==
"@babel/template@^7.0.0", "@babel/template@^7.1.0", "@babel/template@^7.1.2", "@babel/template@^7.2.2":
version "7.2.2"
resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.2.2.tgz#005b3fdf0ed96e88041330379e0da9a708eb2907"
integrity sha512-zRL0IMM02AUDwghf5LMSSDEz7sBCO2YnNmpg3uWTZj/v1rcG2BmQUvaGU8GhU8BvfMh1k2KIAYZ7Ji9KXPUg7g==
dependencies:
"@babel/code-frame" "^7.0.0"
"@babel/parser" "^7.1.2"
"@babel/types" "^7.1.2"
"@babel/parser" "^7.2.2"
"@babel/types" "^7.2.2"

"@babel/traverse@^7.0.0", "@babel/traverse@^7.1.5", "@babel/traverse@^7.1.6":
version "7.1.6"
resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.1.6.tgz#c8db9963ab4ce5b894222435482bd8ea854b7b5c"
integrity sha512-CXedit6GpISz3sC2k2FsGCUpOhUqKdyL0lqNrImQojagnUMXf8hex4AxYFRuMkNGcvJX5QAFGzB5WJQmSv8SiQ==
"@babel/traverse@^7.0.0", "@babel/traverse@^7.1.5", "@babel/traverse@^7.2.2":
version "7.2.2"
resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.2.2.tgz#961039de1f9bcb946d807efe2dba9c92e859d188"
integrity sha512-E5Bn9FSwHpSkUhthw/XEuvFZxIgrqb9M8cX8j5EUQtrUG5DQUy6bFyl7G7iQ1D1Czudor+xkmp81JbLVVM0Sjg==
dependencies:
"@babel/code-frame" "^7.0.0"
"@babel/generator" "^7.1.6"
"@babel/generator" "^7.2.2"
"@babel/helper-function-name" "^7.1.0"
"@babel/helper-split-export-declaration" "^7.0.0"
"@babel/parser" "^7.1.6"
"@babel/types" "^7.1.6"
"@babel/parser" "^7.2.2"
"@babel/types" "^7.2.2"
debug "^4.1.0"
globals "^11.1.0"
lodash "^4.17.10"

"@babel/types@^7.0.0", "@babel/types@^7.1.2", "@babel/types@^7.1.6", "@babel/types@^7.2.0":
version "7.2.0"
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.2.0.tgz#7941c5b2d8060e06f9601d6be7c223eef906d5d8"
integrity sha512-b4v7dyfApuKDvmPb+O488UlGuR1WbwMXFsO/cyqMrnfvRAChZKJAYeeglWTjUO1b9UghKKgepAQM5tsvBJca6A==
"@babel/types@^7.0.0", "@babel/types@^7.2.0", "@babel/types@^7.2.2":
version "7.2.2"
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.2.2.tgz#44e10fc24e33af524488b716cdaee5360ea8ed1e"
integrity sha512-fKCuD6UFUMkR541eDWL+2ih/xFZBXPOg/7EQFeTluMDebfqR4jrpaCjLhkWlQS4hT6nRa2PMEgXKbRB5/H2fpg==
dependencies:
esutils "^2.0.2"
lodash "^4.17.10"
Expand All @@ -193,9 +193,9 @@
through2 "^2.0.3"

"@types/node@*":
version "10.12.14"
resolved "https://registry.yarnpkg.com/@types/node/-/node-10.12.14.tgz#c03b6380c5c301be0499ecd143b99b76ebe45678"
integrity sha512-0rVcFRhM93kRGAU88ASCjX9Y3FWDCh+33G5Z5evpKOea4xcpLqDGwmo64+DjgaSezTN5j9KdnUzvxhOw7fNciQ==
version "10.12.15"
resolved "https://registry.yarnpkg.com/@types/node/-/node-10.12.15.tgz#20e85651b62fd86656e57c9c9bc771ab1570bc59"
integrity sha512-9kROxduaN98QghwwHmxXO2Xz3MaWf+I1sLVAA6KJDF5xix+IyXVhds0MAfdNwtcpSrzhaTsNB0/jnL86fgUhqA==

abab@^1.0.0:
version "1.0.4"
Expand Down Expand Up @@ -235,9 +235,9 @@ acorn@^6.0.2:
integrity sha512-VY4i5EKSKkofY2I+6QLTbTTN/UvEQPCo6eiwzzSaSWfpaDhOmStMCMod6wmuPciNq+XS0faCglFu2lHZpdHUtg==

ajv@^6.5.3, ajv@^6.5.5, ajv@^6.6.1:
version "6.6.1"
resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.6.1.tgz#6360f5ed0d80f232cc2b294c362d5dc2e538dd61"
integrity sha512-ZoJjft5B+EJBjUyu9C9Hc0OZyPZSSlOF+plzouTrg6UlA8f+e/n8NIgBFG/9tppJtpPWfthHakK7juJdNDODww==
version "6.6.2"
resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.6.2.tgz#caceccf474bf3fc3ce3b147443711a24063cc30d"
integrity sha512-FBHEW6Jf5TB9MGBgUUA9XHkTbjXYfAUjY43ACMfmdMRHniyoMHjHjzD50OK8LGDWQwp4rWEsIq5kEqq7rvIM1g==
dependencies:
fast-deep-equal "^2.0.1"
fast-json-stable-stringify "^2.0.0"
Expand Down Expand Up @@ -1711,6 +1711,11 @@ eslint-plugin-mocha@^5.2.0:
dependencies:
ramda "^0.25.0"

eslint-plugin-promise@^4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-4.0.1.tgz#2d074b653f35a23d1ba89d8e976a985117d1c6a2"
integrity sha512-Si16O0+Hqz1gDHsys6RtFRrW7cCTB6P7p3OJmKp3Y3dxpQE2qwOA7d3xnV+0mBmrPoi0RBnxlCKvqu70te6wjg==

eslint-plugin-security@^1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-security/-/eslint-plugin-security-1.4.0.tgz#d4f314484a80b1b613b8c8886e84f52efe1526c2"
Expand Down Expand Up @@ -3739,14 +3744,14 @@ [email protected]:
integrity sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=

nan@^2.9.2:
version "2.11.1"
resolved "https://registry.yarnpkg.com/nan/-/nan-2.11.1.tgz#90e22bccb8ca57ea4cd37cc83d3819b52eea6766"
integrity sha512-iji6k87OSXa0CcrLl9z+ZiYSuR2o+c0bGuNmXdrhTQTakxytAFsC56SArGYoiHlJlFoHSnvmhpceZJaXkVuOtA==
version "2.12.0"
resolved "https://registry.yarnpkg.com/nan/-/nan-2.12.0.tgz#9d443fdb5e13a20770cc5e602eee59760a685885"
integrity sha512-zT5nC0JhbljmyEf+Z456nvm7iO7XgRV2hYxoBtPpnyp+0Q4aCoP6uWNn76v/I6k2kCYNLWqWbwBWQcjsNI/bjw==

nanobuffer@^1.1.3:
version "1.1.3"
resolved "https://registry.yarnpkg.com/nanobuffer/-/nanobuffer-1.1.3.tgz#19d88a68c72bc151c2763cc8b572c96942e432f8"
integrity sha512-gAHcl2SeA30wix6dQWjUyFuLf0YQJX69IEZ6Qcl7S4MTIZQCnOTJUum2n+sZlhUEsrchNCx+eePCpajFhorY5g==
nanobuffer@^1.1.4:
version "1.1.4"
resolved "https://registry.yarnpkg.com/nanobuffer/-/nanobuffer-1.1.4.tgz#43dba1eaf2b95f3025ae4fb6b20d86429ebe0160"
integrity sha512-yy07+we+tsT1P+4kNzoHhfn5GcnZjb7OM62W2jRSdQf/VpB0QB6x5+5k3OKc5i2Fxprs2+P4EgxujUvhsp8TkQ==
dependencies:
source-map-support "^0.5.9"

Expand Down Expand Up @@ -4233,7 +4238,7 @@ path-key@^2.0.0, path-key@^2.0.1:
resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40"
integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=

path-parse@^1.0.5:
path-parse@^1.0.6:
version "1.0.6"
resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c"
integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==
Expand Down Expand Up @@ -4511,9 +4516,9 @@ readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable
util-deprecate "~1.0.1"

readable-stream@^3.0.6:
version "3.0.6"
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.0.6.tgz#351302e4c68b5abd6a2ed55376a7f9a25be3057a"
integrity sha512-9E1oLoOWfhSXHGv6QlwXJim7uNzd9EVlWK+21tCU9Ju/kR0/p2AZYPz4qSchgO8PlLIH4FpZYfzwS+rEksZjIg==
version "3.1.0"
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.1.0.tgz#19c2e9c1ce43507c53f6eefbcf1ee3d4aaa786f5"
integrity sha512-vpydAvIJvPODZNagCPuHG87O9JNPtvFEtjHHRVwNVsVVRBqemvPJkc2SYbxJsiZXawJdtZNmkmnsPuE3IgsG0A==
dependencies:
inherits "^2.0.3"
string_decoder "^1.1.1"
Expand Down Expand Up @@ -4710,11 +4715,11 @@ resolve-url@^0.2.1:
integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=

resolve@^1.1.6, resolve@^1.1.7, resolve@^1.3.2, resolve@^1.4.0:
version "1.8.1"
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.8.1.tgz#82f1ec19a423ac1fbd080b0bab06ba36e84a7a26"
integrity sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA==
version "1.9.0"
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.9.0.tgz#a14c6fdfa8f92a7df1d996cb7105fa744658ea06"
integrity sha512-TZNye00tI67lwYvzxCxHGjwTNlUV70io54/Ed4j6PscB8xVfuBJpRenI/o6dVk0cY0PYTY27AgCoGGxRnYuItQ==
dependencies:
path-parse "^1.0.5"
path-parse "^1.0.6"

restore-cursor@^2.0.0:
version "2.0.0"
Expand Down

0 comments on commit 0b1b0db

Please sign in to comment.