plugin-ruby
plugin-ruby copied to clipboard
[Feature request] Consistency with mainline Prettier
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.
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 I won't be able to get to this for a few days, but I would love to give it a shot!
@daven97 please do!