mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 06:23:38 +00:00
lint: Check for occurrences of .includes except in frontend_tests/.
Adds a custom check to js_rules in `/tools/lint/lib/custom_check.py`.
This commit is contained in:
committed by
Tim Abbott
parent
f6f4a3f50a
commit
e32dd53cd9
@@ -188,6 +188,9 @@ def build_custom_checkers(by_lang):
|
||||
'description': 'Do not concatenate i18n strings'},
|
||||
{'pattern': '\+.*i18n\.t\(.+\)',
|
||||
'description': 'Do not concatenate i18n strings'},
|
||||
{'pattern': '[.]includes[(]',
|
||||
'exclude': ['frontend_tests/'],
|
||||
'description': '.includes() is incompatible with Internet Explorer. Use .indexOf() !== -1 instead.'},
|
||||
{'pattern': '[.]html[(]',
|
||||
'exclude_pattern': '[.]html[(]("|\'|templates|html|message.content|sub.rendered_description|i18n.t|rendered_|$|[)]|error_text|widget_elem|[$]error|[$][(]"<p>"[)])',
|
||||
'exclude': ['static/js/portico', 'static/js/lightbox.js', 'static/js/ui_report.js',
|
||||
|
||||
Reference in New Issue
Block a user