-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.djlint_rules.yaml
38 lines (38 loc) · 1.21 KB
/
.djlint_rules.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# rules:
# - name: Consider adding meta keywords
# pattern: "<head>(?!.*(<meta\s+name=['\"]keywords['\"]\s+content=['\"](.+?)['\"]\s*/?>)).*</head>"
# message: "Consider adding a <meta> tag with the 'keywords' attribute and content."
# level: warning
#
# - name: Tag should be self-closing
# pattern: "<{{ tag }}(?:(?!/>)|[^>])*>.*</{{ tag }}>?"
# message: "Tag '{{ tag }}' should be self-closing."
# level: error
# parameters:
# tag:
# type: string
# description: "The name of the tag that should be self-closing."
# required: true
#
# - name: Html tag should be self-closing
# pattern: "<html(?:(?!/>)|[^>])*>.*</html *>?"
# message: "The <html> tag should be self-closing."
# level: error
options:
ignore_case: true
rules:
- name: Consider adding meta keywords
ignore: true
- name: Tag should be self closing
ignore: true
- name: Endblock should have name
ignore: true
- name: Tag should be self closing
pattern: "<{{ tag }}(?:(?!/>)|[^>])*>.*</{{ tag }}>?"
message: "Tag '{{ tag }}' should be self-closing."
level: error
parameters:
tag:
type: string
description: "The name of the tag that should be self-closing."
required: true