clang-format: [JS] pragmas for tslint, tsc.
authorMartin Probst <martin@probst.io>
Fri, 17 Jan 2020 09:44:10 +0000 (10:44 +0100)
committerMartin Probst <martin@probst.io>
Fri, 17 Jan 2020 12:39:05 +0000 (13:39 +0100)
commit9835cf159014f40e8ea655d0bb3a341ef7ec34f7
tree0bf414f01612b87e29cc9448511b0dd038097bdc
parent33463cfba2be7c8d6c08e666123cc34f114a1f3e
clang-format: [JS] pragmas for tslint, tsc.

Summary:
tslint and tsc (the TypeScript compiler itself) use comment pragmas of
the style:

  // tslint:disable-next-line:foo
  // @ts-ignore

These must not be wrapped and must stay on their own line, in isolation.
For tslint, this required adding it to the pragma regexp. The comments
starting with `@` are already left alone, but this change adds test
coverage for them.

Reviewers: krasimir

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D72907
clang/lib/Format/Format.cpp
clang/unittests/Format/FormatTestJS.cpp