Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

Feature Request: Support trailing comma for function arguments. #1409

Closed
markwongsk opened this issue Jul 18, 2016 · 4 comments
Closed

Feature Request: Support trailing comma for function arguments. #1409

markwongsk opened this issue Jul 18, 2016 · 4 comments

Comments

@markwongsk
Copy link
Contributor

Support trailing comma rule/enhance trailing comma rule for function args.

As per microsoft/TypeScript#7279, functions now support trailing commas for their arguments.

@adidahiya
Copy link
Contributor

nice, thanks for the heads up! I'm looking forward to this

@markwongsk
Copy link
Contributor Author

How far do we want to take this trailing comma rule? For example, type parameters and function types can also be linted:

var a: (
    foo: string,
    bar: string,
) => string

and

function foo<
    T,
    U,
    V,
>(firstArg: string, secondArg: string) { return 42; }

@adidahiya
Copy link
Contributor

I'd say +1 for all of those @markwongsk -- anywhere a trailing comma is supported and a list is multiline, we should lint it

@timocov
Copy link
Contributor

timocov commented Feb 18, 2017

@adidahiya What do you think about be able to disable it for multiline (maybe for singleline too)?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants