gajus / gajus/eslint-plugin-flowtype

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

Open
#456 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
JavaScript
Stars
1.1k
Forks
151
PR merge metrics
No merged PRs in 30d

Description

The [generic-spacing](https://github.com/gajus/eslint-plugin-flowtype#eslint-plugin-flowtype-rules-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:

```js
// 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))),
>
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.