New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spaces instead of tabs #79

Closed
JMSantos94 opened this Issue May 31, 2017 · 16 comments

Comments

Projects
None yet
6 participants
@JMSantos94
Copy link

JMSantos94 commented May 31, 2017

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

@prateekbh

This comment has been minimized.

Copy link
Collaborator

prateekbh commented May 31, 2017

how about prettier?

@prateekbh

This comment has been minimized.

Copy link
Collaborator

prateekbh commented May 31, 2017

@developit @kristoferbaxter @lukeed do we want linters and prettier to be added?

@lukeed

This comment has been minimized.

Copy link
Collaborator

lukeed commented May 31, 2017

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?

@prateekbh

This comment has been minimized.

Copy link
Collaborator

prateekbh commented May 31, 2017

@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.

@lukeed

This comment has been minimized.

Copy link
Collaborator

lukeed commented May 31, 2017

Oh, lol. But I think the issue was opened about the generated output?

@prateekbh

This comment has been minimized.

Copy link
Collaborator

prateekbh commented May 31, 2017

ohh @JMSantos94 we need to ask you abt this 😛
but anyways how about our project @lukeed ?

@lukeed

This comment has been minimized.

Copy link
Collaborator

lukeed commented May 31, 2017

Haha 😜

As per our codebase, that's not up to me & I don't really have input there.

@JMSantos94

This comment has been minimized.

Copy link

JMSantos94 commented May 31, 2017

@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.

@lukeed

This comment has been minimized.

Copy link
Collaborator

lukeed commented May 31, 2017

Cool 😄 Is it okay to close this issue then?

@JMSantos94

This comment has been minimized.

Copy link

JMSantos94 commented May 31, 2017

I guess if it is complicated to do something like:

preact create some-project --indentation spaces

... or not worth the time.

@developit

This comment has been minimized.

Copy link
Owner

developit commented Jun 1, 2017

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.

@JMSantos94

This comment has been minimized.

Copy link

JMSantos94 commented Jun 2, 2017

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 😄

@reznord

This comment has been minimized.

Copy link
Collaborator

reznord commented Jun 27, 2017

@developit

This comment has been minimized.

Copy link
Owner

developit commented Jul 1, 2017

lol - correlation VS causation there, python is used for data science and that's a high paying career right now :P

@jeanlucaslima

This comment has been minimized.

Copy link

jeanlucaslima commented Dec 27, 2017

+1 for editorconfig

@reznord

This comment has been minimized.

Copy link
Collaborator

reznord commented Jan 17, 2018

Now that we have moved to templates entirely, it is in the user-land.

@reznord reznord closed this Jan 17, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment