support "allowSingleLine" option
support for option "allowSingleLine"
This rule has an object option for an exception: "allowSingleLine": true (default false) allows the opening and closing braces for a block to be on the same line
This plugin is theoretically equivalent to applying ESLint formatting (brace-style only) after applying Prettier formatting.
Therefore, currently, it is not possible to tell from the intermediate text (Prettier formatted) whether the original text was written as a single line, so research is needed to implement the feature.
In my code, I sometimes have empty methods, like this:
const test = () => {};
The brace-style rule in ESLint and this plugin will place the brace on the second line, like this:
const test = () =>
{};
Is it possible to allow single line brackets when the function body is empty?
@nogeenkopjethee This is possible if the allowSingleLine option is implemented.