Skip to content

Commit

Permalink
Adopt the latest eslint-config-lifion
Browse files Browse the repository at this point in the history
  • Loading branch information
eaviles committed May 15, 2019
1 parent 5b8a43f commit 3316550
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 66 deletions.
4 changes: 2 additions & 2 deletions lib/kinesis-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ class KinesisClient {
})
.catch(err => {
const error = transformErrorStack(err);
if (RETRIABLE_PUT_ERRORS.indexOf(err.code) > -1) {
if (RETRIABLE_PUT_ERRORS.includes(err.code)) {
reportError(statsSource, error, streamName);
throw error;
} else bail(error);
Expand Down Expand Up @@ -240,7 +240,7 @@ class KinesisClient {
})
.catch(err => {
const error = transformErrorStack(err);
if (RETRIABLE_PUT_ERRORS.indexOf(err.code) > -1) {
if (RETRIABLE_PUT_ERRORS.includes(err.code)) {
reportError(statsSource, error, streamName);
throw error;
} else bail(error);
Expand Down
4 changes: 2 additions & 2 deletions lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ const { BAIL_RETRY_LIST, FORCED_RETRY_LIST } = require('./constants');

function shouldBailRetry(err) {
const { code } = err;
if (FORCED_RETRY_LIST.indexOf(code) !== -1) return false;
return BAIL_RETRY_LIST.indexOf(code) !== -1 || !isRetryAllowed(err);
if (FORCED_RETRY_LIST.includes(code)) return false;
return BAIL_RETRY_LIST.includes(code) || !isRetryAllowed(err);
}

function transformErrorStack(err, stackObj) {
Expand Down
101 changes: 59 additions & 42 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 2 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,7 @@
"check-engines": "^1.5.0",
"codecov": "^3.5.0",
"eslint": "^5.16.0",
"eslint-config-lifion": "^1.1.0",
"eslint-plugin-sort-destructure-keys": "^1.3.0",
"eslint-plugin-sort-keys-fix": "^1.0.1",
"eslint-config-lifion": "^1.2.1",
"husky": "^2.3.0",
"jest": "^24.8.0",
"jest-junit": "^6.4.0",
Expand All @@ -67,23 +65,7 @@
"template": "./templates/CHANGELOG.hbs"
},
"eslintConfig": {
"extends": "lifion",
"plugins": [
"sort-destructure-keys",
"sort-keys-fix"
],
"rules": {
"jsdoc/require-returns-description": "off",
"no-await-in-loop": "off",
"sort-destructure-keys/sort-destructure-keys": "error",
"sort-keys-fix/sort-keys-fix": [
"error",
"asc",
{
"natural": true
}
]
}
"extends": "lifion"
},
"husky": {
"hooks": {
Expand Down

0 comments on commit 3316550

Please sign in to comment.