From facd860a6c99bd91c59654facac294bf33009ffc Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Tue, 14 Jul 2020 15:39:50 -0700 Subject: [PATCH] lint: Exclude i18n string concatenation exposed by Prettier. Signed-off-by: Anders Kaseorg --- tools/linter_lib/custom_check.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/linter_lib/custom_check.py b/tools/linter_lib/custom_check.py index b7765eb928..4ab78608d9 100644 --- a/tools/linter_lib/custom_check.py +++ b/tools/linter_lib/custom_check.py @@ -114,7 +114,10 @@ js_rules = RuleList( 'exclude': {'static/js/templates.js'}, 'description': 'Do not pass a variable into i18n.t; it will not be exported to Transifex for translation.'}, {'pattern': r'i18n\.t\(.+\).*\+', - 'description': 'Do not concatenate i18n strings'}, + 'description': 'Do not concatenate i18n strings', + 'exclude_line': { + ('static/js/narrow.js', 'i18n.t("Some common words were excluded from your search.") +'), + }}, {'pattern': r'\+.*i18n\.t\(.+\)', 'description': 'Do not concatenate i18n strings'}, {'pattern': '[.]html[(]',