lint: Forbid script tags in handlebars templates.

This commit is contained in:
Tim Abbott 2016-12-30 12:43:19 -08:00
parent c650f299fd
commit a0f3f3dfa0
1 changed files with 4 additions and 1 deletions

View File

@ -388,7 +388,10 @@ def build_custom_checkers(by_lang):
]),
'description': "`title` value should be translatable."},
] # type: RuleList
handlebars_rules = html_rules
handlebars_rules = html_rules + [
{'pattern': "[<]script",
'description': "Do not use inline <script> tags here; put JavaScript in static/js instead."},
]
json_rules = [] # type: RuleList # fix newlines at ends of files
# It is okay that json_rules is empty, because the empty list
# ensures we'll still check JSON files for whitespace.