recompile build folder with const over let

This commit is contained in:
Johannes
2022-06-09 10:59:11 +02:00
parent 9792b8e561
commit 2c004b870f
18 changed files with 213 additions and 207 deletions

View File

@@ -41,7 +41,7 @@ module.exports = new (_a = class NoUnexternalizedStrings {
key = keyNode.value;
}
else if (keyNode.type === experimental_utils_1.AST_NODE_TYPES.ObjectExpression) {
for (let property of keyNode.properties) {
for (const property of keyNode.properties) {
if (property.type === experimental_utils_1.AST_NODE_TYPES.Property && !property.computed) {
if (property.key.type === experimental_utils_1.AST_NODE_TYPES.Identifier && property.key.name === 'key') {
if (isStringLiteral(property.value)) {
@@ -83,7 +83,7 @@ module.exports = new (_a = class NoUnexternalizedStrings {
// (2)
// report all invalid NLS keys
if (!key.match(NoUnexternalizedStrings._rNlsKeys)) {
for (let value of values) {
for (const value of values) {
context.report({ loc: value.call.loc, messageId: 'badKey', data: { key } });
}
}