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

@@ -116,6 +116,7 @@ export = new class NoUnexternalizedStrings implements eslint.Rule.RuleModule {
return {
['Literal']: (node: any) => collectDoubleQuotedStrings(node),
['ExpressionStatement[directive] Literal:exit']: (node: any) => doubleQuotedStringLiterals.delete(node),
['CallExpression[callee.type="MemberExpression"][callee.property.name="localize"]:exit']: (node: any) => visitLocalizeCall(node),
['CallExpression[callee.name="localize"][arguments.length>=2]:exit']: (node: any) => visitLocalizeCall(node),
['Program:exit']: reportBadStringsAndBadKeys,