-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Eslint prefer-const #17864
Conversation
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'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Manual fix
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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Manual fix
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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Manual fix
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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Manual fix
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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Manual fix
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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Manual fix
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; |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Manual fix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for adding!
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.