Skip to content
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

[Scala.js-specific] = js.native should always be kept on the same line #108

Closed
sjrd opened this issue Mar 9, 2016 · 1 comment
Closed

Comments

@sjrd
Copy link

sjrd commented Mar 9, 2016

Note that this is not a question of preference of the Scala.js style guide. It should apply equally to all style guides, but it's specific to Scala.js code. The = js.native is a very special beast.

Original:

  def uniform4fv(location: WebGLUniformLocation, v: Float32Array): Unit = js.native

Scalafmt:

  def uniform4fv(location: WebGLUniformLocation, v: Float32Array): Unit =
    js.native

I would like the input to look like this:

  def uniform4fv(location: WebGLUniformLocation,
      v: Float32Array): Unit = js.native

In all cases, js.native should be kept right next to its =. Which means that the line should be broken somewhere else.

Using

  • 0.1.1
  • default
@olafurpg
Copy link
Member

olafurpg commented Mar 9, 2016

I made a special case if you use the Scala.js style AND js.native is the rhs of an assignment (def/val/var).

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

No branches or pull requests

2 participants