Apply prefer-const lint rule

This commit is contained in:
Zaid Abdulla committed 2018-08-25 16:14:34 -07:00
1 parent b43088c03c
commit 09e6a360af
26 files changed
+217 -215

No files matched your search

+10 -10
View File
@@ -32,10 +32,10 @@ class InstanceSet {
}
superset(instance) {
let res = [];
for (let inst of this.set) {
const res = [];
for (const inst of this.set) {
let match = true;
for (let k in instance) {
for (const k in instance) {
if (inst[k] !== instance[k]) {
match = false;
break;
@@ -46,8 +46,8 @@ class InstanceSet {
}
res.sort((a, b) => {
let keysA = Object.keys(a);
let keysB = Object.keys(b);
const keysA = Object.keys(a);
const keysB = Object.keys(b);
if (keysA.length != keysB.length) return keysB.length - keysA.length;
@@ -68,11 +68,11 @@ class InstanceSet {
}
subset(instance) {
let res = [];
const res = [];
for (let inst of this.set) {
for (const inst of this.set) {
let match = true;
for (let k in inst) {
for (const k in inst) {
if (inst[k] !== instance[k]) {
match = false;
break;
@@ -83,8 +83,8 @@ class InstanceSet {
}
res.sort((a, b) => {
let keysA = Object.keys(a);
let keysB = Object.keys(b);
const keysA = Object.keys(a);
const keysB = Object.keys(b);
if (keysA.length != keysB.length) return keysA.length - keysB.length;