Skip to content

comma-spacing and space-before-function-paren are conflict in type #707

Closed
@Austaras

Description

@Austaras

Don't know what's the root cause of this problem, I guess it's the parser

What code were you trying to parse?

function x<R extends Record<string, (this: any) => any>>(fns: R) {
    return fns
}

when eslint config includes

"comma-spacing": "warn",
"space-before-function-paren": ["warn", "never"],

What did you expect to happen?
code shall pass lint

What actually happened?
code violates rule comma-spacing when

function x<R extends Record<string,(this: any) => any>>(fns: R) {
    return fns
}

and violates space-before-function-paren when

function x<R extends Record<string, (this: any) => any>>(fns: R) {
    return fns
}

Versions

package version
@typescript-eslint/parser 1.12.0
TypeScript 3.5.3
ESLint 6.0.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions