Open davidtaylorhq opened 1 year ago
Yeah, i think it's doable! Thanks for the code snippets!
Also, can you provide your prettier settings? Thanks!
Prettier config is here - we use the default lineWidth
of 80.
Our eslint config has decorator-position
configured with a matching lineWidth of 80
In Discourse, we have a handful of property decorators like this:
Prettier breaks this onto two lines, and keeps the
@tracked somePropertyName
'inline', which is great. We'd like to keep this formatting.Unfortunately the
decorator-position
eslint rule fails. It wants to move the decorator onto a line by itself, leaving us with this:A similar problem can be demonstrated with ternary expressions:
Interestingly, multi-line function invocations seem to be accepted by the rule:
Would it be possible to have the
decorator-position
rule accept the two ❌ cases described above?