fusionjs / fusionjs

Modern framework for fast, powerful React apps
https://fusionjs.com
MIT License
1.54k stars 136 forks source link

(create-fusion-app): script `lint` not working out of the box in the new fusion app #595

Closed qqingvarqq closed 5 years ago

qqingvarqq commented 5 years ago

When we create a new fusion app through script yarn create fusion-app. This new app has, lint script, but to run this script you need to add lots of dev dependencies.

eslint-plugin-flowtype
eslint-plugin-react
eslint-plugin-cup
babel-eslint
eslint-plugin-prettier
eslint-plugin-import
eslint-plugin-jest
prettier

To fix this issue we can add those dependencies to package.json in the template. I saw that in other fusion plugins where you use eslint-config-fusion you did this.

But I propose a better solution, in eslint-config-fusion move those dependencies from peer to actual dependencies. It gives us.

  1. There no need to add those dependencies to project packege.json. (makes project file package.json cleaner).
  2. There are noo need to update those peer dependencies by yourself, you need to update just eslint-config-fusion.
  3. It makes the developer experience better because you just add eslint-config-fusion and everything works.

But if we apply changes, those who use eslint-config-fusion with these changes should somehow know that now they can delete those dependencies from his package.json.

I would make PR for this issue If project members agree with one of the solutions.

micburks commented 5 years ago

Closed by https://github.com/fusionjs/fusionjs/commit/c65f4902ae1ce02c07495ac5270856cb433a0e02

As for moving all those dependencies, I'm not entirely sure but I think there may be a technical constraint around doing that. More importantly though, that would put the onus on Fusion maintainers to release a new config every time any of those deps change. I think it's much preferable for engineers to control their specific eslint plugin versions