def on_pre_save(self, view): if(s.get("format_on_save") and jsf_activation.is_js_buffer(view)): # only auto-format on save if there are no "lint errors" # here are some named regions from sublimelint see https://github.com/lunixbochs/sublimelint/tree/st3 lints_regions = ['lint-keyword-underline', 'lint-keyword-outline'] for linter in lints_regions: if len(view.get_regions(linter)): return view.run_command("js_format")
def on_pre_save(self, view): if (s.get("format_on_save") and jsf_activation.is_js_buffer(view)): # only auto-format on save if there are no "lint errors" # here are some named regions from sublimelint see https://github.com/lunixbochs/sublimelint/tree/st3 lints_regions = ['lint-keyword-underline', 'lint-keyword-outline'] for linter in lints_regions: if len(view.get_regions(linter)): return view.run_command("js_format")
def is_visible(self): return jsf_activation.is_js_buffer(self.view)
def on_pre_save(self, view): if (s.get("format_on_save") == True and jsf_activation.is_js_buffer(view)): view.run_command("js_format")
def on_pre_save(self, view): if(s.get("format_on_save") == True and jsf_activation.is_js_buffer(view)): view.run_command("js_format")