-
-
Notifications
You must be signed in to change notification settings - Fork 290
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
:discouraged-var
: deem clojure.core as equivalent to cljs.core?
#2169
Comments
I admit that this is a potential source of confusion, but note that this works the same for all linters, not only for :discouraged-var. |
Got it. I guess I wouldn't necessarily want to encourage an all-encompassing change, but maybe the end result would be in fact desirable? |
Yeah, maybe we could just allow non-qualified symbols, like |
I thought about that, however, from the user perspective, I have a consideration to add: cljs.core and clojure.core can only considered equivalent on a cljs context. e.g., if kondo is linting a .clj file, a rule defined for So things would be asymmetric (just like there's an asymmetry when comparing the clj and cljs compilers). In face of that consideration, does the following concern still apply...?
As I imagine it, a useful existing pattern (worth not 'breaking') would not be possible. I'd be open to change my mind for a specific example. |
About ambiguous: this is just a matter of documenting, if the docs say it refers to all clojure dialects, it is not ambiguous anymore, but just an agreement of what it means. Breakage: I don't know exactly where it was but I believe there was one such case in the config of clerk |
Another option could be to have one symbol to indicate all clojure dialects: https://github.com/clj-kondo/clj-kondo/blob/master/doc/config.md#namespace-groups |
A good example where you need a distinction between For cljs.core you sometimes need different type signatures, e.g. for
|
(apologies for the radio silence - will get back to this as I clear my backlog) |
No worries, I won't have much time this week anyway as I'm heading out to Strange Loop tomorrow |
I tried the following
:discouraged-var
rule, in a cljs-oriented project:It didn't work for
clojure.core/for
, while specifying it forcljs.core/for
did.I would say, for cljs users, clojure.core and cljs.core are largely equivalent.
In specific terms, all of these work in a .cljs file:
So, ideally I could specify
clojure.core/for
and get what I meant. Otherwise there's a risk of a false negative.WDYT?
Thanks - V
The text was updated successfully, but these errors were encountered: