-
Notifications
You must be signed in to change notification settings - Fork 887
Conversation
@@ -0,0 +1,28 @@ | |||
type T = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does it handle space before/after delimiter?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not currently, no. I think that would be more appropriate for the whitespace
rule.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm asking if it would erroneously flag { a: b , c: d }
or { a: b, c: d }
. Should probably have a unit test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, gotcha. Added a test.
wait, this feels pretty inconsistent with how we write out interfaces... users are going to be pretty confused when tslint recommends this format: type Foo {
a: number,
b: number,
}
interface Bar {
a: number;
b: number;
} can we please make the default config prefer semicolons? |
@adidahiya If so, then the current |
@andy-hanson no, I think we can leave trailing-comma as-is. I think this rule (type-literal-delimiter) should enforce the trailing semicolon. |
PR checklist
Overview of change:
Added the
type-literal-delimiter
rule, which prefers{ x: number, y: string }
over{ x: number; y: string }
.CHANGELOG.md entry:
[new-rule]
type-literal-delimiter