max-mapper / standard-format

converts your code into Standard JavaScript Format

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Formatting of arrow-function inconsistent with StandardJS

nknapp opened this issue · comments

The following snippet is an example that is correctly formatted (according to standard):

window.abc = (param) => JSON.stringify({
  param: param
})

standard --format changes the indentation of the last two lines and standard returns an error for the result:

window.abc = (param) => JSON.stringify({
    param: param
  })

Errors:

standard: Use JavaScript Standard Style (https://github.com/feross/standard) 
 .../test.js:2:5: Expected indentation of 2 space characters but found 4.
 .../test.js:3:3: Expected indentation of 0 space characters but found 2.

You should use standard --fix instead of this package. standard-format isn't being actively maintained anymore.