max-mapper / standard-format

converts your code into Standard JavaScript Format
264 stars 59 forks source link

Formatting of arrow-function inconsistent with StandardJS #139

Closed nknapp closed 7 years ago

nknapp commented 8 years ago

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.
feross commented 7 years ago

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