Eslint prefer-const (#17864)

* adds prefer-const to eslint config and runs fixer

* reverts unintended change
This commit is contained in:
Jordan Reimer
2022-11-09 16:15:31 -07:00
committed by GitHub
parent 96d623d3fc
commit 483ef19946
464 changed files with 1701 additions and 1714 deletions

View File

@@ -55,7 +55,7 @@ export default Component.extend(FocusOnInsertMixin, {
firstPartialMatch: null,
transitionToRoute(...args) {
let params = args.map((param, index) => {
const params = args.map((param, index) => {
if (index === 0 || typeof param !== 'string') {
return param;
}
@@ -80,19 +80,19 @@ export default Component.extend(FocusOnInsertMixin, {
return `cert/${key}`;
},
onEnter: function (val) {
let { baseKey, mode } = this;
let extraParams = this.extraNavParams;
const { baseKey, mode } = this;
const extraParams = this.extraNavParams;
if (mode.startsWith('secrets') && (!val || val === baseKey)) {
return;
}
if (this.filterMatchesKey && !utils.keyIsFolder(val)) {
let params = [routeFor('show', mode, this.urls), extraParams, this.keyForNav(val)].compact();
const params = [routeFor('show', mode, this.urls), extraParams, this.keyForNav(val)].compact();
this.transitionToRoute(...params);
} else {
if (mode === 'policies') {
return;
}
let route = routeFor('create', mode, this.urls);
const route = routeFor('create', mode, this.urls);
if (baseKey) {
this.transitionToRoute(route, this.keyForNav(baseKey), {
queryParams: {
@@ -154,7 +154,7 @@ export default Component.extend(FocusOnInsertMixin, {
navigate(key, mode, pageFilter) {
const route = routeFor(key ? 'list' : 'list-root', mode, this.urls);
let args = [route];
const args = [route];
if (key) {
args.push(key);
}
@@ -204,7 +204,7 @@ export default Component.extend(FocusOnInsertMixin, {
handleKeyUp: function (event) {
var keyCode = event.keyCode;
let val = event.target.value;
const val = event.target.value;
if (keyCode === keys.ENTER) {
this.onEnter(val);
}