Comments (7)
In normal Clojure(Script) you can write this as:
(.. m/EdgeInsets.symmetric (horizontal 10) (vertical 5))
Why does ClojureDart need to deviate from this?
from clj-kondo.
Those are not separate methods, but named parameters to the EdgeInsets constructor symmetric
https://api.flutter.dev/flutter/painting/EdgeInsets/EdgeInsets.symmetric.html
from clj-kondo.
For example
;; :require ["package:flutter/material.dart" :as m]
(=
(m/WidgetsBinding.instance.removeObserver some-observer)
(.removeObserver (.-instance m/WidgetsBinding) some-observer)
(-> m/WidgetsBinding .-instance (.removeObserver some-observer)))
from clj-kondo.
I understand those interop forms, but I don't understand your remark about "those are not separate methods" and then saying "for example" where no named parameters occur in the example, or am I missing something?
from clj-kondo.
ClojureDart could support:
(m/EdgeInsets.symmetric :.horizontal 10 :.vertical 5)
or similar for named parameters, has this been considered?
from clj-kondo.
I misunderstood the issue. MainAxisAlignment.center
gives a false positive, but the rest works.
When you lint the above as CLJS it does work:
clj-kondo --lint tmp/dart.cljd --lang cljs
linting took 41ms, errors: 0, warnings: 0
So we just have to convince clj-kondo to do the same as ClojureScript when using ClojureDart
from clj-kondo.
Yeah it's very similar to the js/console.log kind of cljs syntax. Gotta add a possible refer to the mix though (the false positive you mention)
from clj-kondo.
Related Issues (20)
- Support `:discouraged-instance-method` linter for Java interop
- cljs.test: warn about more than one async block per test
- :line-length warnings can't be :clj-kondo/ignore-ed
- Request: support the concept of "closedness" for Maps HOT 4
- clj-kondo fails to report unresolved var name referenced inside the hook HOT 2
- Remove scratch.clj from the jar file
- False positive: unused import when using macroexpand HOT 4
- Trigger :type-mismatch when accessing members of nil HOT 3
- `:unused-value` can't be disabled with `:config-in-call`
- Metadata configuration sometimes fails to apply on the first Kondo run HOT 10
- clj-kondo no longer lints directories if there isn't already a .clj-kondo directory
- :exclude-files isn't honored when linting via stdin (editor mode)
- assert doesn't work HOT 1
- ignore hint doesn't work on invalid symbol
- Static usage of ns-unmap not recognized HOT 1
- (Class/field) should warn HOT 2
- clojure.core/subs positions HOT 1
- Support a gitlab CI friendly output natively HOT 2
- Improved var-usages analysis for multimethods HOT 1
- Support clojure-lsp/unused-public-var for custom macros HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from clj-kondo.