adjust rule to allow double quotes for "use strict" and other directives

This commit is contained in:
Johannes Rieken
2020-01-02 20:43:58 +01:00
parent 2141437fdc
commit 80e6e42a7e
2 changed files with 2 additions and 0 deletions

View File

@@ -100,6 +100,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.name="localize"][arguments.length>=2]:exit']: (node) => visitLocalizeCall(node),
['Program:exit']: reportBadStringsAndBadKeys,