plugin-ruby icon indicating copy to clipboard operation
plugin-ruby copied to clipboard

[Feature request] Consistency with mainline Prettier

Open boris-petrov opened this issue 3 years ago • 3 comments

My .prettierrc.js file currently looks like this:

module.exports = {
  printWidth: 100,
  rubyPlugins: 'plugin/single_quotes,plugin/trailing_comma',
};

That's equivalent to (in the "normal" Prettier):

module.exports = {
  printWidth: 100,
  singleQuote: true,
  trailingComma: 'all',
};

It would be nice if plugin-ruby works with the second one as if I had written the first one. 1) it's consistent with pretty much all other Prettier plugins/configurations; 2) it won't confuse new users of the Ruby plugin.

boris-petrov avatar May 26 '22 06:05 boris-petrov

Yeah I'd be super open to this. It would involve just rewriting the options before they're passed to the child process here: https://github.com/prettier/plugin-ruby/blob/d1eb56712d055c3305c9dd2eccafb0085d703be6/src/parseSync.js#L119. Feel like taking a shot at it?

kddnewton avatar Jul 22 '22 17:07 kddnewton

@kddnewton I won't be able to get to this for a few days, but I would love to give it a shot!

daven97 avatar Jul 22 '22 17:07 daven97

@daven97 please do!

kddnewton avatar Aug 01 '22 19:08 kddnewton