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

Make standard preset #429

Open
trajano opened this issue Apr 21, 2016 · 2 comments
Open

Make standard preset #429

trajano opened this issue Apr 21, 2016 · 2 comments

Comments

@trajano
Copy link

trajano commented Apr 21, 2016

Can we have a preset that would satisfy standard? I got a few though I am still missing one.

whiteSpace: {
  after: {
    FunctionName: 1,
    FunctionReservedWord: 1,
    MethodDefinitionName: 1
  }
}

The one that is missing would be these (from Meteor created app)

Template.hello.helpers({
  counter() {
    return Template.instance().counter.get()
  }
})

Template.hello.events({
  'click button'(event, instance) {
    // increment the counter when button is clicked
    instance.counter.set(instance.counter.get() + 1)
  }
})

The standard expects it to be

Template.hello.helpers({
  counter () {
    return Template.instance().counter.get()
  }
})

Template.hello.events({
  'click button' (event, instance) {
    // increment the counter when button is clicked
    instance.counter.set(instance.counter.get() + 1)
  }
})
@millermedeiros
Copy link
Owner

standard-format is built on top of esformatter, maybe that's what you're looking for?

PS: in the ideal world, standard-format would be just a esformatter preset - I'm going to improve out plugin/preset structure to make it easier to share configs between teams/projects.

@trajano
Copy link
Author

trajano commented Apr 28, 2016

I think I had trouble using https://github.com/maxogden/standard-format/ with gulp which is why I opted for your project. Especially since your project seems to handle ES6 quite nicely.

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

No branches or pull requests

2 participants