sheerun / prettier-standard

Formats with Prettier and lints with ESLint+Standard! (✿◠‿◠)
MIT License
868 stars 44 forks source link

docs(README): suggest standard-damn-it for easy bootstrapping #51

Closed cdaringe closed 6 years ago

cdaringe commented 6 years ago

idea

solution

npx standard-damn-it

discussion

i love this package so much. there's a few packages and configuration bits that i have to look up every time i want to use it with githooks. i got tired of looking them up, so i codified them into a script!

thanks for the consideration.

sheerun commented 6 years ago

I use and recommend modern-node which I created. It is configured to format with prettier-standard by default.

sheerun commented 6 years ago

To configure modern-node to format on commit you can do:

npm install --save-dev modern-node

And then in package.json:

{
  "scripts": {
    "precommit": "modern precommit"
  }
}
cdaringe commented 6 years ago

Hey that's pretty cool! That does all sorts of extra stuff beyond lint/formatting I noticed. For instance I use Ava and don't transpile as part of my workflows.

cdaringe commented 6 years ago

The tool I suggest only installs configures what this package is already recommending.

sheerun commented 6 years ago

You don't need to use all tools of modern-node, I found Jest superior to Ava for node testing and that's why I'm recommending it in modern-node (as name suggests).

As for transpiling, modern-node doesn't recommend it as well, only for publishing which makes your module executable for all node >= 4 even you you use modern ES syntax available natively in node 8 for example. I think this should be required for good node modules.

cdaringe commented 6 years ago

ya, that's cool. i disagree that X is better than Y, and consequently, I don't want it in my node_modules. i also don't want an extra step of indirection, calling into some other tool, versus calling exactly the tool i want (e.g. i don't want to call modern format, i want to call prettier-standard). less indirection, less complication.

i respect your opinion, and think modern node is fine for a lot of folks. i may even try it sometime. i've written a similar tool twice, counsel & shizam.

my final bit is that your docs show how to install this pkg, and how best to configure it. that's all this PR's tool does. automate the install & configure the various settings, nothing separate from what the README already recommends. you're recommending a completely separate tool. that's fine and good, it's just a different intent than helping users fulfill the recommendations of the README.

feel free to re-open as seen fit.