standardrb / standard

Ruby's bikeshed-proof linter and formatter 🚲
Other
2.65k stars 205 forks source link

Editor support for Sublime Text #46

Open searls opened 5 years ago

searls commented 5 years ago

Get in touch with SublimeLinter and fork or extend SublimeLinter-rubocop

davemo commented 5 years ago

As a sublime text user, I'll take a crack at this :)

searls commented 5 years ago

👏 👏 👏

noahpryor commented 5 years ago

Haven't submitted it to packagecontrol yet, but here's a first attempt that appears to be working First attempt

Unfortunately SublimeLinter doesn't support fix commands so we may want to create a separate plugin for formatting on save.

searls commented 5 years ago

Cool! I wonder if @davemo has a chance to play with it

davemo commented 5 years ago

I got as far as cloning the recommended Sublime plugin repo, but haven't touched it otherwise.

cpruitt commented 4 years ago

The StandardRB linter plugin (https://github.com/testdouble/SublimeLinter-contrib-standardrb) was added to the SublimeLinter package control channel in https://github.com/SublimeLinter/package_control_channel/pull/90. There's an option in the plugin to let it play nice alongside the Rubocop linter. I'm sure there are still some rough edges (e.g. Some issues with paths on Windows) but I think it's a pretty stable first version.

cpruitt commented 4 years ago

To clarify (after talking with @davemo). This version shows linter errors in the buffer window but doesn't yet support auto formatting. SublimeLinter works on temp copies of files so there's more work to be done to fix/format the source in the buffer view.

rpbaptist commented 4 years ago

It might be useful to see how PrettierJS handles this.