From fae39e0b6c20fea7b8c7832bd65b20042091763c Mon Sep 17 00:00:00 2001 From: Anna Melzer Date: Sat, 21 Oct 2017 13:35:40 +0200 Subject: [PATCH] Fix warnings for var usage --- src/components/shared/SearchInput.js | 2 +- src/workers/parser/tests/scopes.spec.js | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/shared/SearchInput.js b/src/components/shared/SearchInput.js index c609ff3314..40140f5018 100644 --- a/src/components/shared/SearchInput.js +++ b/src/components/shared/SearchInput.js @@ -6,7 +6,7 @@ import CloseButton from "./Button/Close"; import "./SearchInput.css"; const arrowBtn = (onClick, type, className, tooltip) => { - var props = { + const props = { onClick, type, className, diff --git a/src/workers/parser/tests/scopes.spec.js b/src/workers/parser/tests/scopes.spec.js index 8a7952a1dd..2590eb6183 100644 --- a/src/workers/parser/tests/scopes.spec.js +++ b/src/workers/parser/tests/scopes.spec.js @@ -13,7 +13,7 @@ describe("scopes", () => { column: 2 }); - var vars = getVariablesInLocalScope(scope); + const vars = getVariablesInLocalScope(scope); expect(vars.map(v => v.name)).toEqual(["n"]); expect(vars[0].references[0].node.loc.start).toEqual({ column: 4, @@ -27,7 +27,7 @@ describe("scopes", () => { column: 5 }); - var vars = getVariablesInLocalScope(scope); + const vars = getVariablesInLocalScope(scope); expect(vars.map(v => v.name)).toEqual(["n"]); expect(vars[0].references[0].node.loc.start).toEqual({ @@ -42,7 +42,7 @@ describe("scopes", () => { column: 13 }); - var vars = getVariablesInLocalScope(scope); + const vars = getVariablesInLocalScope(scope); expect(vars.map(v => v.name)).toEqual(["x"]); }); @@ -55,7 +55,7 @@ describe("scopes", () => { column: 5 }); - var vars = getVariablesInScope(scope); + const vars = getVariablesInScope(scope); expect(vars).toEqual([ "this",