mirror of
https://github.com/penpot/penpot.git
synced 2025-01-08 16:00:19 -05:00
✨ Add clj-kondo dependency for linting.
This commit is contained in:
parent
87d355f705
commit
555210175e
5 changed files with 22 additions and 8 deletions
|
@ -54,12 +54,17 @@
|
||||||
{com.bhauman/rebel-readline {:mvn/version "0.1.4"}
|
{com.bhauman/rebel-readline {:mvn/version "0.1.4"}
|
||||||
org.clojure/tools.namespace {:mvn/version "1.0.0"}
|
org.clojure/tools.namespace {:mvn/version "1.0.0"}
|
||||||
org.clojure/test.check {:mvn/version "1.0.0"}
|
org.clojure/test.check {:mvn/version "1.0.0"}
|
||||||
|
clj-kondo {:mvn/version "RELEASE"}
|
||||||
|
|
||||||
fipp/fipp {:mvn/version "0.6.21"}
|
fipp/fipp {:mvn/version "0.6.21"}
|
||||||
criterium/criterium {:mvn/version "0.4.5"}
|
criterium/criterium {:mvn/version "0.4.5"}
|
||||||
mockery/mockery {:mvn/version "0.1.4"}}
|
mockery/mockery {:mvn/version "0.1.4"}}
|
||||||
:extra-paths ["tests"]}
|
:extra-paths ["tests"]}
|
||||||
|
|
||||||
|
:lint
|
||||||
|
{:extra-deps {clj-kondo {:mvn/version "RELEASE"}}
|
||||||
|
:main-opts ["-m" "clj-kondo.main"]}
|
||||||
|
|
||||||
:tests
|
:tests
|
||||||
{:extra-deps {lambdaisland/kaocha {:mvn/version "0.0-581"}}
|
{:extra-deps {lambdaisland/kaocha {:mvn/version "0.0-581"}}
|
||||||
:main-opts ["-m" "kaocha.runner"]}
|
:main-opts ["-m" "kaocha.runner"]}
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
basedir
|
|
|
@ -97,7 +97,7 @@
|
||||||
set name = $2
|
set name = $2
|
||||||
where id = $1")
|
where id = $1")
|
||||||
|
|
||||||
(defn select-library-for-update
|
(defn- select-library-for-update
|
||||||
[conn id]
|
[conn id]
|
||||||
(-> (db/query-one conn [sql:select-library-for-update id])
|
(-> (db/query-one conn [sql:select-library-for-update id])
|
||||||
(p/then' su/raise-not-found-if-nil)))
|
(p/then' su/raise-not-found-if-nil)))
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
;; This Source Code Form is "Incompatible With Secondary Licenses", as
|
;; This Source Code Form is "Incompatible With Secondary Licenses", as
|
||||||
;; defined by the Mozilla Public License, v. 2.0.
|
;; defined by the Mozilla Public License, v. 2.0.
|
||||||
;;
|
;;
|
||||||
;; Copyright (c) 2016-2019 Andrey Antukh <niwi@niwi.nz>
|
;; Copyright (c) 2016-2020 Andrey Antukh <niwi@niwi.nz>
|
||||||
|
|
||||||
(ns user
|
(ns user
|
||||||
(:require
|
(:require
|
||||||
|
@ -17,6 +17,7 @@
|
||||||
[clojure.java.io :as io]
|
[clojure.java.io :as io]
|
||||||
[clojure.repl :refer :all]
|
[clojure.repl :refer :all]
|
||||||
[criterium.core :refer [quick-bench bench with-progress-reporting]]
|
[criterium.core :refer [quick-bench bench with-progress-reporting]]
|
||||||
|
[clj-kondo.core :as kondo]
|
||||||
[promesa.core :as p]
|
[promesa.core :as p]
|
||||||
[promesa.exec :as px]
|
[promesa.exec :as px]
|
||||||
[uxbox.migrations]
|
[uxbox.migrations]
|
||||||
|
@ -71,3 +72,17 @@
|
||||||
(do (require (symbol sns))
|
(do (require (symbol sns))
|
||||||
(test/test-vars [(resolve o)]))
|
(test/test-vars [(resolve o)]))
|
||||||
(test/test-ns o)))))
|
(test/test-ns o)))))
|
||||||
|
|
||||||
|
(defn lint
|
||||||
|
([] (lint ""))
|
||||||
|
([path]
|
||||||
|
(-> (kondo/run!
|
||||||
|
{:lint [(str "src/" path)]
|
||||||
|
:cache false
|
||||||
|
:config {:linters
|
||||||
|
{:unresolved-symbol
|
||||||
|
{:exclude ['(uxbox.services.mutations/defmutation)
|
||||||
|
'(uxbox.services.queries/defquery)
|
||||||
|
'(promesa.core/let)]}}}})
|
||||||
|
(kondo/print!))))
|
||||||
|
|
||||||
|
|
|
@ -27,12 +27,7 @@
|
||||||
[uxbox.util.storage :refer [storage]]
|
[uxbox.util.storage :refer [storage]]
|
||||||
[uxbox.util.timers :as ts]))
|
[uxbox.util.timers :as ts]))
|
||||||
|
|
||||||
;; --- i18n
|
|
||||||
|
|
||||||
(declare reinit)
|
(declare reinit)
|
||||||
;; (rx/sub! i18n/locale-sub #(reinit))
|
|
||||||
|
|
||||||
;; --- Error Handling
|
|
||||||
|
|
||||||
(defn- on-navigate
|
(defn- on-navigate
|
||||||
[router path]
|
[router path]
|
||||||
|
|
Loading…
Reference in a new issue