Skip to content
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

Integrating editor config #551

Closed
ilanbiala opened this issue Oct 3, 2014 · 12 comments
Closed

Integrating editor config #551

ilanbiala opened this issue Oct 3, 2014 · 12 comments

Comments

@ilanbiala
Copy link

What do you guys think about taking into account editorconfig files when beautifying. I'm not sure how many people use this in a package/plugin/build proccess way, but when JSBeautify is used to beautify a file, some settings that editorconfig sets up are disregarded and overriden like trailing newlines. Do you guys think it would be a good idea to allow people to pass in a .editorconfig file programmatically and for the CLI look for one in the cwd and take these settings into account to avoid that code being duplicated everywhere else?

@bitwiseman bitwiseman changed the title Integrating editor confit Integrating editor config Oct 3, 2014
@bitwiseman
Copy link
Member

See http://editorconfig.org/ .

@ilanbiala
Copy link
Author

Yeah I saw that @sindresorhus has a plugin. Do you think it makes sense to integrate editorconfig in any way into this plugin?

@gildesmarais
Copy link

I think it should check for a .editorconfig file in the current project and obey the indent_* settings.

@bitwiseman
Copy link
Member

This tool has no concept of "project". It could probably search the users home directory and the current directory. Maybe search up the tree as well.

As noted int #550 where this was first mentioned, It's not the top of my list of concerns. We've treated this as a library that clients can pass values to, but we have a .jsbeautifyrc file so it could make sense to read a ".editorconfig file. Anyone is welcome to file a PR that implements it. 😄

@joseluisq
Copy link

@bitwiseman I agree !
I think that .jsbeautifyrc config file for now it's enough 👍
So It's not bad idea to read an .editorconfig file settings like enhancement for js-beautify (Maybe, in near future 😄)
Regards !

@ilanbiala
Copy link
Author

What about passing in the JSON of editorconfig to js beautify?

@dcharbonnier
Copy link

editorconfig support would be very very nice

@bitwiseman
Copy link
Member

Please help! Submit a pull request!

@baebb
Copy link

baebb commented Mar 1, 2016

this is would be really useful to contribute to open source projects. Make it pls! ლ ( ◕ ᗜ ◕ ) ლ

@mitermayer
Copy link

Has anyone create a PR for this? I am happy to create one if no-body has done it yet.

@ethanluoyc
Copy link
Contributor

I am starting to implement the editorconfig functionality. Anybody who wants to review my code?

@ethanluoyc
Copy link
Contributor

I have implemented the feature. Please feel free to try it out and comment on it.

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

No branches or pull requests

8 participants