Skip to content

@stylistic/ts/

space-before-blocks

This rule extends the base space-before-blocks rule. It adds support for interfaces and enums.

ts
/*eslint @stylistic/ts/space-before-blocks: "error"*/

enum Breakpoint{
  Large, Mediu
m
;
} interface State{ currentBreakpoint: Breakpoint; }
ts
/*eslint @stylistic/ts/space-before-blocks: "error"*/

enum Breakpoint {
  Large, Mediu
m
;
} interface State { currentBreakpoint: Breakpoint; }

Options

In case a more specific options object is passed these blocks will follow classes configuration option.

correct
incorrect

Released under the MIT License.