From a1e90917d6614e70be2e947b604e9374d8f07e8e Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Tue, 4 Aug 2020 16:49:04 -0700 Subject: [PATCH] lint: Remove custom whitespace rules obsoleted by Prettier. Signed-off-by: Anders Kaseorg --- tools/linter_lib/custom_check.py | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/tools/linter_lib/custom_check.py b/tools/linter_lib/custom_check.py index 6e703615ac..8092e4390c 100644 --- a/tools/linter_lib/custom_check.py +++ b/tools/linter_lib/custom_check.py @@ -177,7 +177,6 @@ js_rules = RuleList( 'good_lines': ['#my-style {color: blue;}'], 'bad_lines': ['

Foo

', 'style = "color: blue;"']}, *whitespace_rules, - *comma_whitespace_rule, ], ) @@ -419,27 +418,10 @@ bash_rules = RuleList( css_rules = RuleList( langs=['css', 'scss'], rules=[ - {'pattern': r'^[^:]*:\S[^:]*;$', - 'description': "Missing whitespace after : in CSS", - 'good_lines': ["background-color: white;", "text-size: 16px;"], - 'bad_lines': ["background-color:white;", "text-size:16px;"]}, - {'pattern': '[a-z]{', - 'description': "Missing whitespace before '{' in CSS.", - 'good_lines': ["input {", "body {"], - 'bad_lines': ["input{", "body{"]}, {'pattern': r'^(?:(?!/\*).)*https?://', 'description': "Zulip CSS should have no dependencies on external resources", 'good_lines': ['background: url(/static/images/landing-page/pycon.jpg);'], 'bad_lines': ['background: url(https://example.com/image.png);']}, - {'pattern': '^[ ][ ][a-zA-Z0-9]', - 'description': "Incorrect 2-space indentation in CSS", - 'strip': '\n', - 'good_lines': [" color: white;", "color: white;"], - 'bad_lines': [" color: white;"]}, - {'pattern': r'{\w', - 'description': "Missing whitespace after '{' in CSS (should be newline).", - 'good_lines': ["{\n"], - 'bad_lines': ["{color: LightGoldenRodYellow;"]}, {'pattern': ' thin[ ;]', 'description': "thin CSS attribute is under-specified, please use 1px.", 'good_lines': ["border-width: 1px;"], @@ -457,7 +439,6 @@ css_rules = RuleList( 'good_lines': ['hsl(0, 0%, 0%)', 'hsla(0, 0%, 100%, 0.1)'], 'bad_lines': ['rgb(0, 0, 0)', 'rgba(255, 255, 255, 0.1)']}, *whitespace_rules, - *comma_whitespace_rule, ], )