nettofarah / prettifier

Get started with prettier with just one command.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature : add support for prettier-standard

ritz078 opened this issue · comments

https://github.com/sheerun/prettier-standard

It is really helpful as I can get rid of .eslintrc or prettier-eslint . Mostly useful for tiny modules. Let me know if you will accept a PR for this.

That's actually super similar to a feature I'm working on right now.
Let me push the branch and show you what I mean. We can probably join our efforts :)

https://github.com/nettofarah/prettifier/tree/format

@ritz078 I'm thinking of adding an option to allow for fixing your whole project.
So basically you'd something like: prettifier --format **/**.js and it would fix your project for you.


As for prettier-standard. I'm not sure how bringing standard into the mix would work.
I'm afraid we'd be making the package way too opinionated, but I think we should at least chat about the option.

When people use prettier (formatter), most of the times they will also use eslint (linter) as both serve different purposes as the prettier you will be able to format the code but still, it won't check for some eslint rules that you might want.. The alternatives are :

  • use prettier-eslint - In this case it will run eslint --fix after prettier. You still need to setup eslintrc
  • use prettier-standard - It does the same as above but I think there's no need to setup eslint in this case. This one is easier to setup and minimizes the mess.

We can ask the user at the start whether he wants prettier or prettier-standard as we already have inquirer setup. So it won't be opinionated but configurable.