Skip to content
This repository has been archived by the owner on Jun 27, 2022. It is now read-only.

Linter support for kotlin-js #9

Open
Jomik opened this issue Oct 1, 2018 · 5 comments
Open

Linter support for kotlin-js #9

Jomik opened this issue Oct 1, 2018 · 5 comments

Comments

@Jomik
Copy link

Jomik commented Oct 1, 2018

I get linter errors in my project that uses kotlin-js.
On external and the js functions exposed.

Is this on my end or do we need to update something in this package?
I'd be willing to submit a PR, if I can get a pointer 👍

I guess setting the executable to be kotlinc-js fixes it for me.
But we probably want to be able to detect that, and use the proper executable for the project.

@francis36012
Copy link
Owner

The error is from the compiler (kotlinc) itself. As you've found out, it looks like some special support is required to be able to compile a class with the external modifier. For example in gradle, the kotlin-platform-js plugin has to be applied.

If you think you can work on this, then please go ahead and open a pull request when you have something working.

@Jomik Jomik changed the title Linter errors for kotlin-js Linter support for kotlin-js Oct 3, 2018
@Jomik
Copy link
Author

Jomik commented Oct 3, 2018

This does seem to require a bit more thought than I thought initially.
The kotlinc-js command does not take the same arguments as kotlinc.
Is there a reason that something like ktlint isn't used?

@francis36012
Copy link
Owner

I've been thinking of using ktlint instead of kotlinc but I have not been able to get around to it

@Jomik
Copy link
Author

Jomik commented Oct 3, 2018

I take it that a pr to switch to ktlint is acceptable too then

@francis36012
Copy link
Owner

That's right, such a PR is welcomed

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants