bcomnes / sublime-standard-format

:sparkles: Runs standard --fix against the javascript in your ST3 window on save or manually.
https://packagecontrol.io/packages/StandardFormat
MIT License
60 stars 21 forks source link

Decide how to format based on package.json #30

Closed bcomnes closed 8 years ago

bcomnes commented 9 years ago

:droplet: Shower thought: What if this plugin decided on which linter to use based on package.json?

Originally I pondered adding a formatter field to package.json, but we don't need that. It should be some kind of dependency for the project using it which essentially offers up consent to autoformatting.

The goal here is to eliminate busy work enabling and disabling linters when they differ between projects. Has this been a problem for anyone else?

Flet commented 9 years ago

Yeah I've done the dance between standard and semistandard and its a little tiresome... This is a good idea!

How can it be done reliably?

bcomnes commented 9 years ago

Re-implement package.json discovery in python based on project folders (or shell out to JS)? It might get a bit logically harry but I think we can manage it.

No package.json you ask? Why are you developing js without a package.json :smiling_imp:

But seriously, in that case Leave the keyboard shortcuts/pallet commands active with a command pallet formatter selector maybe?

Flet commented 9 years ago

What would be the indicator in package.json that something is standard or semistandard or doublestandard? :)

bcomnes commented 9 years ago

The indicator would be that it has one of those packages installed and saved to its dependency list.

bcomnes commented 8 years ago

Closing in favor of https://github.com/bcomnes/sublime-standard-format/issues/35