This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-01-22
Channels
- # announcements (5)
- # aws (38)
- # aws-lambda (21)
- # babashka (45)
- # beginners (87)
- # boot (1)
- # calva (32)
- # cider (23)
- # clara (7)
- # clj-kondo (41)
- # cljs-dev (29)
- # clojure (145)
- # clojure-europe (6)
- # clojure-italy (12)
- # clojure-nl (4)
- # clojure-spec (39)
- # clojure-uk (45)
- # clojurescript (171)
- # copenhagen-clojurians (4)
- # cursive (14)
- # datomic (48)
- # docker (6)
- # figwheel-main (2)
- # fulcro (54)
- # jackdaw (1)
- # jobs (1)
- # kaocha (3)
- # leiningen (7)
- # luminus (6)
- # malli (2)
- # off-topic (51)
- # pathom (8)
- # quil (20)
- # re-frame (14)
- # reagent (1)
- # reitit (2)
- # remote-jobs (1)
- # shadow-cljs (39)
- # tools-deps (1)
- # vim (12)
- # xtdb (5)
idea: inspection that warns about a function definition without ! at the end of the name that includes a call to a function with ! at the end of the name in the body
Also, it's possible for a function to be pure even though it mutates things. e.g. a function which uses transients for performance but returns the persistent collection.
I've mentioned this a few times, I have a plan to write something that will rewrite your project into consistency automatically
I want a few other pieces in place first, namely alignment of forms needs careful preservation. Doing research into that now :)
Is there an exception for js/ in cljs?
@eraserhd That feature is already in clj-kondo: https://github.com/borkdude/clj-kondo/blob/master/doc/config.md#alias-consistency Although you have to decide on one accepted alias using the config before you get a warning. The analysis output can also help to detect difference and to create the initial config.
@borkdude oh weird I get it for https://github.com/roman01la/proton-native-cljs using atom and the linter-kondo plugin (inside core.cljs)
@aviflax was going to do a PR to fix this I believe. it's doesn't pass the --lang
flag so clj-kondo doesn't know this is cljs
it seems the commit is already in there, so maybe try upgrading the plugin @sfyire? https://github.com/gerred/linter-kondo/blob/master/index.js
@borkdude oh I see that might be why I don't see that error in cursive, looks like they haven't tagged up a release yet in linter-kondo, good to know it's incoming though
@gerred It's about this PR https://github.com/gerred/linter-kondo/pull/2#issuecomment-574752149 which isn't released yet
@gerred avi mentioned: > but first one of us should test this change in the last comment of that issue. 🙂
I have an example of a failing test case but not sure how to build the plugin locally, will do some googling
ok so I've uninstalled the existing plugin, done git clone
and I can see the plugin in atom's list
now there's no error but also don't see anything when adding (inc "test") so I think I may have done something wrong
I did see other people talking about using apm link
ah figured out why, I usually disable toasts but it does hide important stuff:
this isn't a bug in the linter it's something I've done to try and load it in dev mode
ok I've figured out a couple of things, the above error I needed to npm i
but I'm still not seeing anything when I console log that line I get:
looks like clj-kondo expects cljs instead of .cljs for that argument, I've "fixed" that locally but that doesn't appear to have fixed it
good spot that's working in a local hack
@gerred I think this might be what we're after: https://github.com/gerred/linter-kondo/pull/3