Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eslint prefer-const #17864

Merged
merged 2 commits into from
Nov 9, 2022
Merged

Eslint prefer-const #17864

merged 2 commits into from
Nov 9, 2022

Conversation

zofskeez
Copy link
Contributor

@zofskeez zofskeez commented Nov 9, 2022

Adds prefer-const rule to eslint config and runs the fixer for existing violations. All changes (other than to .eslintrc) were done by the rule fixer other than where indicated.

@zofskeez zofskeez added the ui label Nov 9, 2022
@zofskeez zofskeez added this to the 1.13.0-rc1 milestone Nov 9, 2022
Comment on lines -129 to +139
let csvData = [],
csvHeader = [
'Namespace path',
'Authentication method',
'Total clients',
'Entity clients',
'Non-entity clients',
];
const csvData = [];
const csvHeader = [
'Namespace path',
'Authentication method',
'Total clients',
'Entity clients',
'Non-entity clients',
];

if (newAttribution) {
csvHeader = [...csvHeader, 'Total new clients, New entity clients, New non-entity clients'];
csvHeader.push('Total new clients, New entity clients, New non-entity clients');
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Manual fix

Comment on lines -4 to -14
let ret;
ret = payload.data.keys.map((key) => {
let model = {
return payload.data.keys.map((key) => {
const model = {
id: key,
};
if (payload.backend) {
model.backend = payload.backend;
}
return model;
});
return ret;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Manual fix

Comment on lines -21 to -31
let ret;
ret = payload.data.keys.map((key) => {
let model = {
return payload.data.keys.map((key) => {
const model = {
id: key,
};
if (payload.backend) {
model.backend = payload.backend;
}
return model;
});
return ret;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Manual fix

Comment on lines -5 to -15
let ret;
ret = payload.data.keys.map((key) => {
let model = {
return payload.data.keys.map((key) => {
const model = {
id: key,
};
if (payload.backend) {
model.backend = payload.backend;
}
return model;
});
return ret;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Manual fix

Comment on lines -43 to -53
let ret;
ret = payload.data.keys.map((key) => {
let model = {
return payload.data.keys.map((key) => {
const model = {
id: key,
};
if (payload.backend) {
model.backend = payload.backend;
}
return model;
});
return ret;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Manual fix

Comment on lines -9 to +17
let itemID;
let aliasID;
let idRow;
if (itemType === 'groups') {
await createItemPage.createItem(itemType, 'external');
await settled();
} else {
await createItemPage.createItem(itemType);
await settled();
}
idRow = showItemPage.rows.filterBy('hasLabel').filterBy('rowLabel', 'ID')[0];
itemID = idRow.rowValue;
let idRow = showItemPage.rows.filterBy('hasLabel').filterBy('rowLabel', 'ID')[0];
const itemID = idRow.rowValue;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Manual fix

Comment on lines -67 to +78
let itemID;
let aliasID;
let idRow;
if (itemType === 'groups') {
await createItemPage.createItem(itemType, 'external');
await settled();
} else {
await createItemPage.createItem(itemType);
await settled();
}
idRow = showItemPage.rows.filterBy('hasLabel').filterBy('rowLabel', 'ID')[0];
itemID = idRow.rowValue;
let idRow = showItemPage.rows.filterBy('hasLabel').filterBy('rowLabel', 'ID')[0];
const itemID = idRow.rowValue;
await page.visit({ item_type: itemType, id: itemID });
await settled();
await page.editForm.name(name).submit();
await settled();
idRow = aliasShowPage.rows.filterBy('hasLabel').filterBy('rowLabel', 'ID')[0];
aliasID = idRow.rowValue;
const aliasID = idRow.rowValue;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Manual fix

@@ -89,14 +88,14 @@ module('Acceptance | Enterprise | control groups', function (hooks) {
'read -field=accessor sys/internal/ui/mounts/auth/userpass',
]);
await settled();
userpassAccessor = consoleComponent.lastTextOutput;
const userpassAccessor = consoleComponent.lastTextOutput;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Manual fix

@zofskeez zofskeez enabled auto-merge (squash) November 9, 2022 22:04
Copy link
Contributor

@hellobontempo hellobontempo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for adding!

@zofskeez zofskeez merged commit 483ef19 into main Nov 9, 2022
@hellobontempo hellobontempo deleted the ui/VAULT-9843/prefer-const branch November 9, 2022 23:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants