mihai-vlc / sublime-jsfmt

jsfmt plugin for Sublime Text
MIT License
477 stars 21 forks source link

.jsfmtrc ignored #13

Closed lloiser closed 10 years ago

lloiser commented 10 years ago

Only options set in the .sublime-settings are used for jsfmt... (note: win 8)

mihai-vlc commented 10 years ago

I have pushed a fix for it. As they are right now the settings from .sublime-settings file always have priority.

lloiser commented 10 years ago

works now! but it isn't very practical that the .sublime-settings overrides the project's .jsfmtrc settings. should probably be the other way round: .jsfmtrc > .sublime-settings

karbassi commented 10 years ago

I agree with @lloiser that the project settings file (.jsfmtrc) should override the editor settings (.sublime-settings).

Some projects differ in their formatting rules and it would be annoying having to change your editor settings when switching between projects.

paulirish commented 10 years ago

agree. You want your general settings to take effect only if no project-specific preferences are declared.

lloiser commented 10 years ago

switching the order of confand process.argv in those two lines https://github.com/paulirish/sublime-jsfmt/blob/master/jsfmt.js#L9-L10 would do the trick.

mihai-vlc commented 10 years ago

I have pushed a fix, however I think for the json options we should always use the options from .sublime-settings. If there is a .jsfmtrc file in the project it's most probably configured for js files not json.

lloiser commented 10 years ago

works!