fix(typescript): workaround eslint/typescript-eslint-parser#257 (#1533)
This commit is contained in:
1 parent
11e3d8241f
commit
c337c83043
2 files changed
+10
-2
No files matched your search
@@ -1411,6 +1411,14 @@ function genericPrintNoParens(path, options, print, args) {
|
||||
|
||||
return concat(parts);
|
||||
case "JSXIdentifier":
|
||||
// Can be removed when this is fixed:
|
||||
// https://github.com/eslint/typescript-eslint-parser/issues/257
|
||||
if (n.object && n.property) {
|
||||
return join(".", [
|
||||
path.call(print, "object"),
|
||||
path.call(print, "property")
|
||||
]);
|
||||
}
|
||||
return "" + n.name;
|
||||
case "JSXNamespacedName":
|
||||
return join(":", [
|
||||
|
||||
+2
-2
@@ -134,7 +134,7 @@ namespace C {
|
||||
var a: string = C.a.x;
|
||||
var b: { x: number, y: number } = new C.a.Point(0, 0);
|
||||
var c: { name: string };
|
||||
var c: undefined.Id;
|
||||
var c: C.a.B.Id;
|
||||
|
||||
namespace X {
|
||||
|
||||
@@ -182,7 +182,7 @@ var o: { name: string };
|
||||
var o = new M.D("Hello");
|
||||
|
||||
var p: { x: number, y: number };
|
||||
var p: undefined.Point;
|
||||
var p: M.D.Point;
|
||||
|
||||
`;
|
||||
|
||||
|
||||
Reference in new issue
Block a user