djLint/src/rules.yaml

25 lines
685 B
YAML
Raw Normal View History

2021-07-12 18:26:46 +00:00
- rule:
name: E001
message: Variables should be wrapped in a single whitespace.
patterns:
- '{[{|%|#][^\s]+'
- '[^\s]+[}|%|#]}'
- \s{2,}[}|%|#]}
- '{[{|%|#]\s{2,}'
- rule:
name: E002
message: Double quotes should be used in tags.
patterns:
- '{%.?extends\s+?[^\"]\w+'
- rule:
name: W003
message: 'Endblock should have name. Ex: {% endblock body %}.'
patterns:
- '{%\s*?endblock\s*?%}'
- rule:
name: W004
message: Status urls should follow {% static path/to/file %} pattern.
# this should be using the static path from django settings
patterns:
- <(?:link|img|script)\s[^\>]*?(?:href|src)=[\"\']/?static/?