max-mapper / standard-format

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

Missing space before function parentheses after formatting code #116

Closed feross closed 8 years ago

feross commented 9 years ago

Moving from feross/standard. Original issue here: https://github.com/feross/standard/issues/264

With this code:

var test = {
  hello() {}
}
test.hello()

Format code doesn't work:

astanciu commented 9 years ago

+1

tusharmath commented 8 years ago

+1

tusharmath commented 8 years ago

No Solution yet?

jamesjoshuahill commented 8 years ago

+1

z0mt3c commented 8 years ago

+1

sorahn commented 8 years ago

This breaks basically every single component file in a ES6 react project now. :(

class Foo extends React.Component {
  componentWillMount () {}
  componentDidMount () {}
  componentWillReceiveProps () {}
  shouldComponentUpdate () {}
  componentWillUpdate () {}
  componentDidUpdate () {}
  componentWillUnmount () {}
  render () {}
}

Tagging related bugs: #75, #134, and millermedeiros/esformatter#384

janecakemaster commented 8 years ago

any word on when this will be fixed yet?

feross commented 8 years ago

@janecakemaster Hi! This package needs some love :) All the maintainers would love to fix it, but we're really busy! A pull request would be lovely!

janecakemaster commented 8 years ago

@feross i'd love to help, is there anything i can read up on to get started? never worked on a package like this before

chenxsan commented 8 years ago

Thought this issue is related to https://github.com/millermedeiros/esformatter/issues/368.

feross commented 8 years ago

@janecakemaster Yeah! The package uses esformatter to actually format the code. You can read about it here: https://www.npmjs.com/package/esformatter

Essentially, we pass it a configuration specifying how we want the code to be formatted and it does it for us. There's been lots of progress on esformatter since we created standard-format so there are probably lots of new "rules" we can add to the configuration file to do a better job with formatting.

Happy to add you (or anyone else who is reading this) as a maintainer after one or two good PRs. :smile:

janecakemaster commented 8 years ago

damn that's a lot of configs to go through. i'll take a look in the next week or so when i've got spare time

feross commented 8 years ago

@janecakemaster Sounds good.

MatthewOverall commented 8 years ago

any further updates on this issue?

hxshandle commented 8 years ago

any updates? I met the same problem.

bcomnes commented 8 years ago

@hxshandle we are moving towards using the --fix flag provided by eslint directly so we don't have to maintain two rulesets. I believe the latest standard has this already.

feross commented 8 years ago

This issue is fixed if you use the new formatter: standard --fix.

Ensure you're using the latest standard, version 8.0.0. You can check with standard --version.