mattmcmanus / atom-ember-snippets

Ember.js ES6 snippets for Atom
https://atom.io/packages/ember-snippets
MIT License
38 stars 22 forks source link

No destructuring? #24

Closed samselikoff closed 7 years ago

samselikoff commented 7 years ago

I did the destructuring thing for a while (const { Component } = Ember;) but it seems to have fallen out of favor. Wondering if we could/should switch back to Ember.Component, like in the guides?

Also I just saw this tweet: https://twitter.com/MiguelCamba/status/884724694871666688. It would be nice to add these soon, but I'm not sure about what they depend on.

Exelord commented 7 years ago

Yeah, I think it can be replaced with https://github.com/ember-cli/ember-rfc176-data

mattmcmanus commented 7 years ago

It's not out of favor until ember-suave says so! But seriously, that's we're I typically take my cues.

Thanks for the link @Exelord. That should be easy enough to grep and make something useful.

How would you want the snippet shorthands to work? I'm thinking something like prefixing all of them with ime. Something along the lines of:

Thoughts?

Exelord commented 7 years ago

Now, even the official ember eslint plugin is saying so! :) https://github.com/ember-cli/eslint-plugin-ember/pull/90

EDIT:

For imports, there is currently an atom plugin: https://atom.io/packages/ember-module-snippets But unfortunately, you are overriding each other :/ https://github.com/jbailey4/atom-ember-module-snippets/issues/1

mattmcmanus commented 7 years ago

I just shipped 2.1.0 which includes work done by @jbailey4 to merge in his ember-module-snippets into this plugin. I'll cut a 3.0.0 soon, which will update the existing file skeleton to use the new imports.

Feedback welcome!