Skip to content

Commit

Permalink
Enable prefer-const in the eslint config (#404)
Browse files Browse the repository at this point in the history
  • Loading branch information
JustinBeckwith authored and alexander-fenster committed Sep 20, 2018
1 parent fac2897 commit 197b760
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ rules:
eqeqeq: error
no-warning-comments: warn
no-var: error
prefer-const: error
2 changes: 1 addition & 1 deletion samples/iam.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ function removeBucketIamMember(bucketName, roleName, members) {

// Finds and updates the appropriate role-member group
const index = policy.bindings.findIndex(role => role.role === roleName);
let role = policy.bindings[index];
const role = policy.bindings[index];
if (role) {
role.members = role.members.filter(
member => members.indexOf(member) === -1
Expand Down
2 changes: 1 addition & 1 deletion samples/system-test/encryption.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ test.serial(`should rotate keys`, async t => {
const output = generateKeyResults.stdout + generateKeyResults.stderr;
t.regex(output, new RegExp(`Base 64 encoded encryption key:`));
const test = /^Base 64 encoded encryption key: (.+)$/;
let newKey = output.match(test)[1];
const newKey = output.match(test)[1];

const results = await tools.runAsyncWithIO(
`${cmd} rotate ${bucketName} ${fileName} ${key} ${newKey}`,
Expand Down

0 comments on commit 197b760

Please sign in to comment.