-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a built-in config for clj-kondo (#18)
- Loading branch information
Showing
4 changed files
with
23 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,8 @@ | ||
{:linters {:unresolved-symbol {:exclude [goog.DEBUG | ||
(spade.core/defattrs [at-media]) | ||
(spade.core/defclass [at-media]) | ||
(spade.core/defglobal [at-media]) | ||
(spade.core/defkeyframes [at-media]) | ||
|
||
(com.rpl.specter/recursive-path) | ||
]}} | ||
(com.rpl.specter/recursive-path)]}} | ||
:lint-as {applied-science.js-interop/defn clojure.core/defn | ||
applied-science.js-interop/let clojure.core/let | ||
applied-science.js-interop/fn clojure.core/fn | ||
reagent.core/with-let clojure.core/let | ||
spade.core/defattrs clojure.core/defn | ||
spade.core/defclass clojure.core/defn | ||
spade.core/defglobal clojure.core/def | ||
spade.core/defkeyframes clojure.core/defn}} | ||
reagent.core/with-let clojure.core/let} | ||
:config-paths ["../resources/clj-kondo.exports/net.dhleong/spade"]} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{:linters {:unresolved-symbol {:exclude [(spade.core/defattrs [at-media]) | ||
(spade.core/defclass [at-media]) | ||
(spade.core/defglobal [at-media]) | ||
(spade.core/defkeyframes [at-media])]} | ||
|
||
; defglobal needs a name to be bound to, but is unlikely to | ||
; actually be referenced anywhere (because it's, y'know, global). | ||
; So we automatically ignore its public vars by default | ||
:clojure-lsp/unused-public-var {:exclude-when-defined-by #{spade.core/defglobal}}} | ||
:hooks {:expand-macro {spade.core/defglobal hooks.defglobal/as-macro}} | ||
:lint-as {spade.core/defattrs clojure.core/defn | ||
spade.core/defclass clojure.core/defn | ||
spade.core/defglobal clojure.core/def | ||
spade.core/defkeyframes clojure.core/defn}} |
5 changes: 5 additions & 0 deletions
5
resources/clj-kondo.exports/net.dhleong/spade/hooks/defglobal.clj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
(ns hooks.defglobal) | ||
|
||
#_{:clj-kondo/ignore [:clojure-lsp/unused-public-var]} | ||
(defmacro as-macro [the-name & body] | ||
`(def ~the-name ~@body)) |