Open
Description
I'm looking for a way to disallow cuddling, but allow single line blocks
// Should cause Error: leftCurly
typedef FooCuddle = {
a:Int,
b:String
};
// correct way
typedef FooCorrect =
{
a:Int,
b:String
};
// Allowed
typedef Foo = { a:Int, b:String };
If possible, I would like to be able to allow this for only specific tokens
Options:
- New option: "nlas" for "new line allow single [line]. Doc: should occur on a new line unless the entire token and block are a single line
- New prop: "ignoreSingleLines". Doc: allow the token and block to be a single line
I prefer option 2, as "nlas" is cryptic, in fact I'd prefer if "nlow" had a separate prop as well, though i don't know what that should be
For either option, you could enable this for certain tokens by creating multiple left curly checks with different props on different tokens