-
Notifications
You must be signed in to change notification settings - Fork 450
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
Does not look up from the current file's directory to find .jsbeautifyrc #875
Comments
I have this same issue. The plugin will only find and use the .jsbeautifyrc file in the user home directory. If it does not exist there, an error is thrown. It does not find the project's own .jsbeautifyrc file. |
I will be adding many tests to #864 to ensure that the settings are being properly extracted from both package settings and |
I have to add, that actually I found that it sometimes work and some times not. For example, I have a good .jsbeautifyrc file in the project root, and it does not affect subdir. Then I copy it to the subdir, now it works in that subdir. Till now everything as I wrote in the issue. But then I delete all .jsbeautifyrc file from project and then copy a fresh new .jsbeautifyrc file (with identical content) into project root - and now it works even in subdirs. So, it is not a deterministic behavious, or at least not idempotent one. I couldn't figure out the real cause. |
I'd recommend that you take a look at the following functions and see if you can make any changes that fixes this experience for you:
I would be happy to review and merge a pull request that resolves this issue. Thanks! |
Important to everyone experiencing this issue: please provide the debugging information in a Gist as described at https://github.com/Glavin001/atom-beautify/blob/master/ISSUE_TEMPLATE.md#debug |
I have added tests that demonstrate that this feature is working. Please provide your debugging information and I can investigate this further. Thank you. |
Published to v0.29.0 |
Description
When the .jsbeautifyrc is in current directory - it works fine. When .jsbeautifyrc is in a parent directory - it does not apply.
Steps to Reproduce
I use the following simple config file. My global config is tab = 2 chars, in the following .jsbeautifyrc config it is 4 chars. When I do beautify (inside .js file) in the same directory where the .jsbeautifyrc is located it apply 4 chars tab as expected. But with the same js file in a subdirectory (where there is no .jsbeautifyrc and no other files at all) it beautifies with 2 chars tab (as in global settings).
I believe it does not look up from the current file's directory to find .jsbeautifyrc in contrast to what is stated in the README.
Thank you for great work on this extension!
The text was updated successfully, but these errors were encountered: