I know this is a minor thing, but could we somewhere on the roadmap have a small configuration option to use spaces instead of tabs?
For now good old sed: sed -i.bak -E $'s/\t/ /' fileName.js
how about prettier?
@developit @kristoferbaxter @lukeed do we want linters and prettier to be added?
I may be alone on this, but I believe this is user land. Once #56 makes its way in, devs can add in whatever they'd like. And in the meantime, prettier can be added now on top of any install.
Maybe we could include some recipes to illustrate how to achieve some of these things, but then this becomes yet another bit to maintain. What do you think?
@lukeed #56 is based for the project created with preact-cli.
whereas i was talking about adding prettier to the preact-cli codebase itself, to lint this repo, not the ones created with it.
Oh, lol. But I think the issue was opened about the generated output?
ohh @JMSantos94 we need to ask you abt this 馃槢
but anyways how about our project @lukeed ?
Haha 馃槣
As per our codebase, that's not up to me & I don't really have input there.
@lukeed @prateekbh Sorry if I wasn't clear enough. Yes, I am referring to the output project when you use preact create. Prettier is a nice option, but I agree with @lukeed on it being on the user land.
Cool 馃槃 Is it okay to close this issue then?
I guess if it is complicated to do something like:
preact create some-project --indentation spaces
... or not worth the time.
Right now files aren't processed by preact create, only moved/renamed. We'd have to stream them all through node in order to do a spaces transform.
That said, I'd like to have preact create [type] actually go to Github to fetch the project, and scaffold it out from a real repo. If we do that, we can have much more varied project types. We'd also have the opportunity to transform incoming files, either manually or via eslint --fix / prettier / etc. Vue-cli uses a lib called download-git-repo, or we could use Yeoman which does transformations already.
One other interesting thing here - I always have an .editorconfig in my public projects to avoid PRs that just change whitespace. Currently, preact create doesn't scaffold an editorconfig, but if it did we would need to prompt for spaces VS tabs or have a --spaces / --indent spaces option like you suggested. Might also fall under the realm of yeoman.
Thanks for the insight @developit!
Yeah, .editorconfig is pretty awesome.
As I mentioned before, this is not a big deal. Would be nice to keep it in somewhere though 馃槃
lol - correlation VS causation there, python is used for data science and that's a high paying career right now :P
+1 for editorconfig
Now that we have moved to templates entirely, it is in the user-land.
Most helpful comment
how about
prettier?