mirror of https://github.com/zulip/zulip.git
lint: Ban 2-space indentation in our CSS.
Probably most properly we should check for any number of spaces that isn't 4, but that's a bit more work to do with our linter framework, and in practice basically every CSS whitespace error we see is 2-space.
This commit is contained in:
parent
855c306c01
commit
aaa221233a
|
@ -311,6 +311,11 @@ def build_custom_checkers(by_lang):
|
||||||
'description': "Missing whitespace after : in CSS"},
|
'description': "Missing whitespace after : in CSS"},
|
||||||
{'pattern': '[a-z]{',
|
{'pattern': '[a-z]{',
|
||||||
'description': "Missing whitespace before '{' in CSS."},
|
'description': "Missing whitespace before '{' in CSS."},
|
||||||
|
{'pattern': '^[ ][ ][a-zA-Z0-9]',
|
||||||
|
'description': "Incorrect 2-space indentation in CSS",
|
||||||
|
'exclude': set(['static/styles/thirdparty-fonts.css']),
|
||||||
|
'strip': '\n',
|
||||||
|
},
|
||||||
{'pattern': '{\w',
|
{'pattern': '{\w',
|
||||||
'description': "Missing whitespace after '{' in CSS (should be newline)."},
|
'description': "Missing whitespace after '{' in CSS (should be newline)."},
|
||||||
] + whitespace_rules # type: RuleList
|
] + whitespace_rules # type: RuleList
|
||||||
|
|
Loading…
Reference in New Issue