eslint - make nls-rule a little more strict

This commit is contained in:
Johannes Rieken
2020-01-03 11:44:54 +01:00
parent 16a84b4902
commit a9f8033549
2 changed files with 2 additions and 2 deletions

View File

@@ -101,7 +101,7 @@ module.exports = new (_a = class NoUnexternalizedStrings {
return {
['Literal']: (node) => collectDoubleQuotedStrings(node),
['ExpressionStatement[directive] Literal:exit']: (node) => doubleQuotedStringLiterals.delete(node),
['CallExpression[callee.type="MemberExpression"][callee.property.name="localize"]:exit']: (node) => visitLocalizeCall(node),
['CallExpression[callee.type="MemberExpression"][callee.object.name="nls"][callee.property.name="localize"]:exit']: (node) => visitLocalizeCall(node),
['CallExpression[callee.name="localize"][arguments.length>=2]:exit']: (node) => visitLocalizeCall(node),
['Program:exit']: reportBadStringsAndBadKeys,
};