-
Notifications
You must be signed in to change notification settings - Fork 453
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
Can't get .jsbeautifyrc to work on windows. #236
Comments
I do not have a Windows computer to test on (Mac has been tested). What is your Also what version of Atom and Atom Beautify do you have. |
My Atom is version 0.187.0. My version of atom-beautify is 0.21.6. This is my .jsbeautifyrc file:
I've tested with a few javascript files and some scss files (assuming this will still work with the css rules). For javascript, I would assume that this code:
Would get beautified to:
But it just leaves it the way it already is. I would also assume this code For my scss file, it goes from this:
To this:
So in that case it doesn't seem to respect my rules either. So, either I'm totally misunderstanding how to use this, or it just doesn't seem to work. |
I am going to work on #237 which will help with diagnosing this and other issues. |
Sounds good. Thanks for being so responsive. |
I published the new Debug Command to v0.22.0 |
Here is the full error report. Atom Version: 0.187.0 Stack TraceUncaught ReferenceError: showError is not defined
Commands
Config{
"core": {
"themes": [
"atom-dark-ui",
"atom-monokai"
],
"disabledPackages": [
"autocomplete-paths",
"emmet",
"autocomplete-plus",
"autocomplete-snippets"
]
},
"atom-beautify": {
"_analyticsUserId": "7754683f-f9d7-45f1-86d4-b7060a1f332f"
}
} Installed Packages# User
angularjs, v0.1.0
atom-beautify, v0.22.2
atom-monokai, v0.6.0
color-picker, v1.4.4
editorconfig, v0.3.2
grunt-runner, v0.7.0
highlight-line, v0.10.1
ionic-atom, v0.3.1
language-aspx, v0.2.0
language-csharp, v0.5.0
language-ejs, v0.1.0
language-jade, v0.3.0
language-powershell, v2.0.0
open-recent, v2.2.0
# Dev
No dev packages |
Yes there is a bug at https://github.com/Glavin001/atom-beautify/blob/master/lib/beautify.coffee#L249-L251 |
Published fix for Debug command to v0.22.3 |
Here is the debug output. My Atom Beautify - Debugging informationThe following debugging information was generated by Platform: win32 VersionsAtom Version: 0.187.0 Atom Beautify Version: 0.22.3 Original file to be beautifiedOriginal File Path: Original File Grammar: JavaScript Original File Contents: (function() {
"use strict";
angular
.module('myApp.controllers')
.controller('DriverStartController', ['$scope', '$rootScope', 'PubNub', 'PUBNUBCONFIG', function($scope, $rootScope, PubNub, PUBNUBCONFIG) {
$scope.readyToDrive = false;
$scope.readyToDriveChanged = function() {
};
}]);
}()); Beautification optionsEditor Options: {
"indent_size": 2,
"indent_char": " ",
"indent_with_tabs": false
} Config Options: {
"js": {
"indent_size": 2,
"indent_char": " ",
"indent_level": 0,
"indent_with_tabs": false,
"preserve_newlines": true,
"max_preserve_newlines": 10,
"space_in_paren": false,
"jslint_happy": false,
"space_after_anon_function": false,
"brace_style": "collapse",
"break_chained_methods": false,
"keep_array_indentation": false,
"keep_function_indentation": false,
"space_before_conditional": true,
"eval_code": false,
"unescape_strings": false,
"wrap_line_length": 0,
"end_with_newline": false
},
"css": {
"indent_size": 2,
"indent_char": " ",
"selector_separator_newline": false,
"newline_between_rules": false
},
"html": {
"htmlbeautifier_path": "",
"indent_inner_html": false,
"indent_size": 2,
"indent_char": " ",
"brace_style": "collapse",
"indent_scripts": "normal",
"wrap_line_length": 250,
"wrap_attributes": "auto",
"wrap_attributes_indent_size": 2,
"preserve_newlines": true,
"max_preserve_newlines": 10,
"unformatted": [
"a",
"sub",
"sup",
"b",
"i",
"u"
],
"end_with_newline": false
},
"sql": {
"indent_size": 2,
"keywords": "upper",
"identifiers": "lower",
"sqlformat_path": ""
},
"markdown": {
"pandoc_path": "",
"yaml_front_matter": true
},
"perl": {
"perltidy_path": "perltidy",
"perltidy_profile": ""
},
"php": {
"beautifier_path": "",
"filters": "",
"directory_filters": ""
},
"python": {
"autopep8_path": "",
"max_line_length": 79,
"indent_size": 2,
"ignore": [
"E24"
]
},
"ruby": {
"rbeautify_path": ""
},
"c": {
"uncrustifyPath": "",
"configPath": ""
},
"cpp": {
"uncrustifyPath": "",
"configPath": ""
},
"objectivec": {
"uncrustifyPath": "",
"configPath": ""
},
"cs": {
"uncrustifyPath": "",
"configPath": ""
},
"d": {
"uncrustifyPath": "",
"configPath": ""
},
"java": {
"uncrustifyPath": "",
"configPath": ""
},
"pawn": {
"uncrustifyPath": "",
"configPath": ""
},
"vala": {
"uncrustifyPath": "",
"configPath": ""
}
} Home Options: {} EditorConfig Options: {
"charset": "utf-8",
"end_of_line": "lf",
"indent_size": 2,
"indent_style": "space",
"insert_final_newline": true,
"trim_trailing_whitespace": true,
"tab_width": 2,
"indent_char": " "
} Project Options: [
{},
{},
{},
{},
{},
{},
{}
] LogsError logs: Not yet supported |
So it is definitely not loading your file however it should be passing over it on its way up from your file path to root. You have put it in the correct place though. What is the contents of your .jsbeautifyrc file? — On Mon, Mar 16, 2015 at 6:40 PM, Eric Lebetsamer [email protected]
|
Ok, I feel like a total idiot now, but I had mixed json and the yaml format in the file. Totally user error, so sorry for wasting your time on this one. I guess as an upside, you've added some debug code that might come in handy in the future, lol. |
Oh, I will say though, that the |
Feel free to create another issue and we can look into that.
No worries, I had a feeling that was the case anyway 😉. It is always good to go through the steps just to be sure. I hope to add even more debugging that will make simple issues like this very clear and quick to resolve. |
I'm running Atom on windows and trying to use a .jsbeautifyrc file in the root of my project, but no matter what I have tried, it just doesn't seem to work. Or maybe I'm just not understanding how it works. I've tried the json format and also the yaml format. Has this been tested on windows? Is there something I am missing about how to get this to work?
The text was updated successfully, but these errors were encountered: