create-caspian-app 1.3.19 → 1.3.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -90,7 +90,17 @@ RULES: list[Rule] = [
|
|
|
90
90
|
Rule(
|
|
91
91
|
"unquoted-brace-attr",
|
|
92
92
|
# `class={...}` / `selected={...}` -- invalid HTML, silently blanks the page.
|
|
93
|
-
|
|
93
|
+
#
|
|
94
|
+
# An attribute only exists *inside an opening tag*, and the rule must say
|
|
95
|
+
# so. A bare `\s[\w:.\-]+=\{` also matches `DIR={path}` in a shell script
|
|
96
|
+
# and `ENV PORT={port}` in a Dockerfile -- and this repo embeds both in
|
|
97
|
+
# triple-quoted strings under `src/lib/aws/`, which the Python scan keeps
|
|
98
|
+
# because it cannot tell a heredoc from a template. Requiring the opening
|
|
99
|
+
# tag is not a loosening: a real violation is always inside one.
|
|
100
|
+
#
|
|
101
|
+
# `[^<>]*?` bounds the attribute run to a single tag; it matches newlines
|
|
102
|
+
# (negated classes do), so an attribute on its own line is still caught.
|
|
103
|
+
re.compile(r"<[a-zA-Z][\w:.\-]*(?:[^<>]*?)?\s[\w:.\-]+=\{"),
|
|
94
104
|
"Unquoted brace attribute. This is invalid HTML: the parser splits the "
|
|
95
105
|
"value on spaces, the component root never compiles, and the page "
|
|
96
106
|
'renders blank with no console error. Quote it: attr="{expr}".',
|
|
@@ -116,7 +126,12 @@ RULES: list[Rule] = [
|
|
|
116
126
|
),
|
|
117
127
|
Rule(
|
|
118
128
|
"jsx-fragment",
|
|
119
|
-
|
|
129
|
+
# `</>` is unambiguous, and a well-formed fragment always has one. A bare
|
|
130
|
+
# `<>` is not: it is SQL's not-equals operator, and this repo runs
|
|
131
|
+
# `WHERE pid <> pg_backend_pid()` from a triple-quoted string. So the
|
|
132
|
+
# open tag counts only when an element follows it, which is what a
|
|
133
|
+
# fragment looks like and what `<> value` in SQL never does.
|
|
134
|
+
re.compile(r"</>|<>\s*<"),
|
|
120
135
|
"JSX fragment. A template needs exactly one real root element.",
|
|
121
136
|
),
|
|
122
137
|
Rule(
|