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

Multi-line literals with a single entry are treated as single-line literals for trailing commas #856

Closed
prencher opened this issue Dec 6, 2015 · 3 comments

Comments

@prencher
Copy link

prencher commented Dec 6, 2015

Given the following:

{
   foo
}

TSLint will treat this as a single line literal rather than a multi-line literal. Because of this, you can't find all these cases without also turning on single-line literals, which means also hitting e.g. import statements such as import { Foo } from './bar'

@adidahiya
Copy link
Contributor

Looks like a bug. ESLint's comma-dangle rule flags that example as a failure, so we should do the same.

@jkillian
Copy link
Contributor

jkillian commented Feb 1, 2016

Fixed in #952 by @pe8ter

@adidahiya
Copy link
Contributor

Fix is now available in v3.4.0-dev.1

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