eslint-plugin-flowtype icon indicating copy to clipboard operation
eslint-plugin-flowtype copied to clipboard

generic-spacing only ignores line breaks when there’s no indentation

Open sonicdoe opened this issue 4 years ago • 0 comments

The generic-spacing rule was updated with https://github.com/gajus/eslint-plugin-flowtype/pull/430 to not error when using line breaks. However, this only works when there’s no indentation. For example:

// Same pattern as in the readme. Doesn’t error.
type X = Promise<
  (foo),
  bar,
  (((baz))),
>

// Same pattern as above. Errors with:
// There must be no space at end of "Promise" generic type annotation
function foo() {
  type X = Promise<
    (foo),
    bar,
    (((baz))),
  >
}

sonicdoe avatar Nov 30 '20 16:11 sonicdoe