kabisa / maji

Maji is a framework to build great hybrid mobile apps.
https://www.majimobile.com/
MIT License
18 stars 10 forks source link

fixes js styling in WelcomePage.js #237

Closed ariejan closed 5 years ago

ariejan commented 5 years ago

How to reproduce

  1. Create new Maji app with yarn create maji-app
  2. Run bin/maji test

What happens?

src/modules/welcome/containers/WelcomePage.js
  51:24  error  Replace `mapStateToProps,·mapDispatchToProps` with `⏎··mapStateToProps,⏎··mapDispatchToProps⏎`  prettier/prettier

✖ 1 problem (1 error, 0 warnings)

What did you expect to happen instead?

OK. 7  total assertions passed.

This PR updates WelcomePage.js for stylelint compliance. This makes a newly generated project pass all tests out of the box.

pascalw commented 5 years ago

@ariejan can you fix the linting issues as well? Thanks! 👍

pascalw commented 5 years ago

Ok, this is interesting. CI is now failing, because we run Prettier on all JS files in the project including the project template. However, the Prettier version used in a new generated project is slightly newer so these different Prettier versions basically disagree :-)

To fix that, I'm excluding the project template from Prettier here.

pascalw commented 5 years ago

Something else 🐟 y is going on. There's a duplicate dependency on Prettier which causes weird behavior. Depending on install order, or something else semi random, you might get a different Prettier version. Great! I'll fix this in a separate PR.

https://github.com/kabisa/maji/issues/240 created to fix this.

pascalw commented 5 years ago

@ariejan with #240 fixed this change is no longer needed. The code was already correctly formatted for the version of Prettier that was supposed to be used, but you were seeing this failure because the wrong version of Prettier got used.