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
Running tsfmt -r replaces the file and removes consecutive blank lines as this:
constx='hello';console.log(x);
Expected behavior
I expect the output file sill has consecutive blank lines (as the original) since no-consecutive-blank-lines is explicitly set to false. If tslint.json contains "no-consecutive-blank-lines": [true, 2] I would expect the output file gets removed some blank lines but keeps two of them. Instead every time no-consecutive-blank-lines is set to something all blank lines are collapsed to one.
If I run npx tsfmt --no-tslint -r then blank lines are not removed. The same if I take off the option of tslint.json at all.
By the way, why that option needs to be addressed here in a postprocessing? Isn't that on the tslint realm? Users can just run tslint --fix and let it take care of this.
The text was updated successfully, but these errors were encountered:
Looking at the block of code, it could probably be a bit more robust, since it fails for Windows newlines (CRLF) and also doesn't account for "whitespace" blank lines.
Having this file (with 4 empty/blank lines):
and
tslint.json
:Running
tsfmt -r
replaces the file and removes consecutive blank lines as this:Expected behavior
I expect the output file sill has consecutive blank lines (as the original) since
no-consecutive-blank-lines
is explicitly set tofalse
. Iftslint.json
contains"no-consecutive-blank-lines": [true, 2]
I would expect the output file gets removed some blank lines but keeps two of them. Instead every timeno-consecutive-blank-lines
is set to something all blank lines are collapsed to one.If I run
npx tsfmt --no-tslint -r
then blank lines are not removed. The same if I take off the option oftslint.json
at all.By the way, why that option needs to be addressed here in a postprocessing? Isn't that on the
tslint
realm? Users can just runtslint --fix
and let it take care of this.The text was updated successfully, but these errors were encountered: