Skip to content

Commit

Permalink
Merge pull request #178 from laconiajs/dependabot/npm_and_yarn/eslint…
Browse files Browse the repository at this point in the history
…-config-standard-13.0.1

Bump eslint-config-standard from 12.0.0 to 13.0.1
  • Loading branch information
geoffdutton committed Jul 15, 2019
2 parents b0a4c6b + 1c2b1cb commit 3ac3c57
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 48 deletions.
49 changes: 13 additions & 36 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"dynamodb-local": "0.0.29",
"eslint": "^6.0.1",
"eslint-config-prettier": "^6.0.0",
"eslint-config-standard": "^12.0.0",
"eslint-config-standard": "^13.0.1",
"eslint-plugin-import": "^2.16.0",
"eslint-plugin-node": "^9.1.0",
"eslint-plugin-prettier": "^3.0.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const getMappingEntries = mappings =>

const getMappingResponse = (mappings, error) => {
let mappingResponse = {};
for (let [errorRegex, mapping] of getMappingEntries(mappings)) {
for (const [errorRegex, mapping] of getMappingEntries(mappings)) {
if (error.name.match(errorRegex)) {
mappingResponse = mapping(error);
break;
Expand Down
8 changes: 4 additions & 4 deletions packages/laconia-batch/test/S3ItemReader.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ describe("S3 Item Reader", () => {
it("retrieves a directly stored array", async () => {
s3.getObject.mockImplementation(s3Body(["Foo"]));
const reader = new S3ItemReader(new AWS.S3(), s3Params, ".");
let next = await reader.next();
const next = await reader.next();

expect(next).toEqual({ item: "Foo", cursor: { index: 0 }, finished: true });
});

it("retrieves next item when path given is an array of 1 item", async () => {
s3.getObject.mockImplementation(s3Body(["Foo"]));
const reader = new S3ItemReader(new AWS.S3(), s3Params, ".");
let next = await reader.next();
const next = await reader.next();

expect(next).toEqual({ item: "Foo", cursor: { index: 0 }, finished: true });
});
Expand All @@ -48,7 +48,7 @@ describe("S3 Item Reader", () => {
})
);
const reader = new S3ItemReader(new AWS.S3(), s3Params, "list");
let next = await reader.next();
const next = await reader.next();

expect(next).toHaveProperty("item", "Foo");
});
Expand All @@ -72,7 +72,7 @@ describe("S3 Item Reader", () => {
s3Params,
'database.music[0]["category"].list'
);
let next = await reader.next();
const next = await reader.next();

expect(next).toHaveProperty("item", "Foo");
});
Expand Down
4 changes: 2 additions & 2 deletions packages/laconia-config/src/SecretsManagerConfigConverter.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ module.exports = class SecretsManagerConfigConverter {
// Decrypts secret using the associated KMS CMK.
// Depending on whether the secret is a string or binary, one of these fields will be populated.
let secret;
if (res.hasOwnProperty("SecretString")) {
if ({}.hasOwnProperty.call(res, "SecretString")) {
secret = res.SecretString;
} else {
let buff = Buffer.from(res.SecretBinary, "base64");
const buff = Buffer.from(res.SecretBinary, "base64");
secret = buff.toString("ascii");
}

Expand Down
2 changes: 1 addition & 1 deletion packages/laconia-config/test/EnvVarConfigFactory.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ describe("EnvVarConfigFactory", () => {

describe("when there are no matching converter", () => {
it("should not attempt to convert value", async () => {
let ssmConverter = {
const ssmConverter = {
convertMultiple: jest.fn().mockResolvedValue({})
};
const env = { LACONIA_CONFIG_FOO: "unknown:/path/to/secret" };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ describe("ApiGatewayInputHeaders", () => {
"content-type": "application/json"
});

expect(inputHeaders.hasOwnProperty("content-type")).toBeTrue();
expect(inputHeaders).toHaveProperty("content-type");
});

it("should should allow access to existing methods using normal case", async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ describe("parseRequestBody", () => {

describe("when content type is x-www-form-urlencoded", () => {
it("should parse form data into payload", () => {
let event = createApiGatewayEvent({
const event = createApiGatewayEvent({
body: "field1=one&field2=two",
headers: {
"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"
Expand Down
2 changes: 1 addition & 1 deletion packages/laconia-test-helper/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const reduceNexts = async (reader, times, startingCursor, callback) => {
};

const collectNexts = async (reader, times, startingCursor) => {
let nexts = [];
const nexts = [];
await reduceNexts(reader, times, startingCursor, next => nexts.push(next));
return nexts;
};
Expand Down

0 comments on commit 3ac3c57

Please sign in to comment.