Alonski / realworld-ember

This repository is deprecated. Please visit:
https://github.com/gothinkster/ember-realworld-example-app
5 stars 0 forks source link

Setup linting and style enforcement. #10

Closed Alonski closed 7 years ago

Alonski commented 7 years ago

We should be using ESLint and Prettier +- Standard to format our Javascript. If we need custom CSS we can use stylelint and stylefmt. Maybe using SASS instead of plain CSS

Alonski commented 7 years ago

In addition to this I am using VSCode and would like to setup our style enforcement there with settings. @alexlafroscia Does it make sense to enforce using VSCode? Do you use something else?

alexlafroscia commented 7 years ago

Definitely not interested in enforcing a particular editor... What would that solve? If we want style enforcement (which shouldn't really be necessary since the CSS is pulled from the CDN) then we can set that up as a linter that runs as part of the tests, like ESLint does.

Definitely in favor of ESLint though. Prettier is a good idea too; I like it and it's helpful for projects without a styleguide (and I don't want to write a whole styleguide for this).

Alonski commented 7 years ago

All right. How do you have any experience adding prettier into the build pipeline for Ember? I want handlebar formatting to be consistent as well as JS. For CSS I understand that we probably won't need to format it.

alexlafroscia commented 7 years ago

The only tool I know for HBS style checking is ember-template-lint

https://github.com/rwjblue/ember-cli-template-lint https://github.com/rwjblue/ember-template-lint

We can set that up if you want, but I'm happy to just do code review for style issues too.


I have configured prettier+eslint before on a number of projects. Happy to do that here.

Alonski commented 7 years ago

Ok cool. I'll look into setting up ember-template-lint

alexlafroscia commented 7 years ago

Great. Should just require installing ember-cli-template-lint.

I'll set up ESLint + prettier when I get home from work tonight.

Alonski commented 7 years ago

Ok cool. Sounds easy enough

jamesbrewerdev commented 7 years ago

Howdy! Since #15 got merged, should this issue be closed?

Alonski commented 7 years ago

@brwr I want to setup ember-cli-template-lint and then close this 😄

jamesbrewerdev commented 7 years ago

Awesome! Thank you for your work!

On Wed, Apr 26, 2017 at 9:59 AM Alon Bukai notifications@github.com wrote:

@brwr https://github.com/brwr I want to setup ember-cli-template-lint and then close this 😄

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Alonski/realworld-ember/issues/10#issuecomment-297475706, or mute the thread https://github.com/notifications/unsubscribe-auth/AD5-rBpWnRttE0j6AmMFBDM5jolk_seAks5rz3gEgaJpZM4NF_M8 .

Alonski commented 7 years ago

@brwr Thanks a lot! Once we get more into this I will look for more Ember people to contribute. @alexlafroscia I tried setting up ember-cli-template-lint but the current builds have errors. Waiting for those to resolve before trying again. https://github.com/rwjblue/ember-cli-template-lint/issues/185

alexlafroscia commented 7 years ago

No worries. I'm not really concerned too much with linting the templates (i've never used that plugin before, even) so I'm fine with the ESLint/Prettier setup that we have now, and then just catching issues in the templates through code review.

alexlafroscia commented 7 years ago

This issue was moved to gothinkster/ember-realworld-example-app#3