You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.
The method foo on a single line reports an invalid "Missing semicolon" violation, but the method bar on multiple lines does not report a violation (correctly).
Expected behavior
The number of lines a method takes up should not affect whether a semicolon is required or not. I would expect a single-line method to not require a semicolon just like the rest.
The text was updated successfully, but these errors were encountered:
@nchen63 Perhaps I am misunderstanding, but this does not appear to be a duplicate of that issue.
Improper semicolons are being reported on class method members unless they are declared on a single line, in which case it reports that a semicolon is required which is incorrect.
Here's a better example:
class myClass {
public foo1 = () => { } //<-- reports "missing semicolon" (incorrect)
public bar1 = () => {
} //<-- nothing reported (correct)
public foo2 = () => { }; //<-- nothing reported (incorrect, this should not be required)
public bar2 = () => {
}; //<-- reports "misplaced semicolon" (correct)
}
Bug Report
4.4.2
2.1.6
gulp-tslint 7.1.0
TypeScript code being linted
with
tslint.json
configuration:Actual behavior
The method
foo
on a single line reports an invalid "Missing semicolon" violation, but the methodbar
on multiple lines does not report a violation (correctly).Expected behavior
The number of lines a method takes up should not affect whether a semicolon is required or not. I would expect a single-line method to not require a semicolon just like the rest.
The text was updated successfully, but these errors were encountered: