forked from frappe/lms
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtailwind-rtl.yml
More file actions
22 lines (22 loc) · 911 Bytes
/
tailwind-rtl.yml
File metadata and controls
22 lines (22 loc) · 911 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Local run: semgrep scan --config .github/semgrep/tailwind-rtl.yml --metrics off .
rules:
- id: tailwind-physical-class
message: |
RTL: replace physical Tailwind class with logical equivalent.
languages: [generic]
severity: WARNING
paths: { include: ["*.vue"] }
pattern-regex: |
(?x)
(?:^|[\s'"`{(\[,]) !?(?:[a-z][a-z0-9-]*:)*-?
(?:
(?:scroll-)?[mp][lr]-(?:auto|px|full|\d+(?:[./]\d+)?|\[[^\]]+\])
| (?:left|right)-(?:auto|px|full|\d+(?:[./]\d+)?|\[[^\]]+\])
| text-(?:left|right)
| float-(?:left|right)
| clear-(?:left|right)
| (?:border|rounded)-[lr](?:-[A-Za-z0-9\[\]./#%_-]+)?
| rounded-(?:tl|tr|bl|br)(?:-[A-Za-z0-9\[\]./#%_-]+)?
| space-x-(?:auto|px|reverse|\d+(?:[./]\d+)?|\[[^\]]+\])
)
!? (?=$|[\s'"`})\],>;])