Apply prefer-const lint rule
This commit is contained in:
1 parent
b43088c03c
commit
09e6a360af
26 files changed
+217
-215
No files matched your search
@@ -34,11 +34,11 @@ function estimateGpnCount(gpnPatterns, depth = 0) {
|
||||
let wildcardDiscovered = false;
|
||||
let gpnCount = 0;
|
||||
|
||||
for (let pattern of gpnPatterns) {
|
||||
for (const pattern of gpnPatterns) {
|
||||
const path = pattern[0];
|
||||
const flags = pattern[1] >> depth;
|
||||
|
||||
let k = path[depth];
|
||||
const k = path[depth];
|
||||
|
||||
if (!k) {
|
||||
if (flags & 1) gpnCount = 1;
|
||||
@@ -67,8 +67,8 @@ function estimateGpnCount(gpnPatterns, depth = 0) {
|
||||
estimateGpnCount(wildcardChildren, depth + 1) * WILDCARD_MULTIPLIER;
|
||||
}
|
||||
|
||||
for (let k of Object.keys(children)) {
|
||||
let c = estimateGpnCount(children[k].concat(wildcardChildren), depth + 1);
|
||||
for (const k of Object.keys(children)) {
|
||||
const c = estimateGpnCount(children[k].concat(wildcardChildren), depth + 1);
|
||||
wildcardGpnCount -= c;
|
||||
gpnCount += c;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user