Skip to content

Commit 0e6ef5c

Browse files
committed
enable the .clj-kondo warnings for ornament-invalid-syntax
1 parent 6b18b47 commit 0e6ef5c

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

.clj-kondo/config.edn

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
{:lint-as {lambdaisland.ornament/defprop clojure.core/def
22
lambdaisland.ornament/defrules clojure.core/def}
3-
:hooks {:analyze-call {lambdaisland.ornament/defstyled hooks.ornament/defstyled}}}
3+
:hooks {:analyze-call {lambdaisland.ornament/defstyled hooks.ornament/defstyled}}
4+
:linters {:lambdaisland.ornament/invalid-syntax
5+
{:level :warning}}}

.clj-kondo/hooks/ornament.clj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,13 @@
1313
_ (when-not (api/keyword-node? html-tag)
1414
(api/reg-finding! {:row (:row (meta html-tag))
1515
:col (:col (meta html-tag))
16-
:message "Html-tag must be a keyword"
16+
:message "Tag must be a keyword or an ornament-styled-component"
1717
:type :lambdaisland.ornament/invalid-syntax}))
1818
; _ (prn :html-tag html-tag)
1919
; _ (prn :more more)
2020
fn-tag (first (drop-while (fn [x]
21-
(or (api/keyword-node? x)
21+
(or (api/string-node? x)
22+
(api/keyword-node? x)
2223
(api/map-node? x)
2324
(api/vector-node? x)))
2425
more))

0 commit comments

Comments
 (0)