Closed cdaringe closed 6 years ago
I use and recommend modern-node which I created. It is configured to format with prettier-standard by default.
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"
}
}
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.
The tool I suggest only installs configures what this package is already recommending.
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.
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.
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.