keywords are not allowed as local specifier (#307)

Also fix some error messages to be more specific
This commit is contained in:
Daniel Tschinder
2017-02-10 14:58:44 +01:00
committed by GitHub
parent e049ec3456
commit 4bd682e90b
21 changed files with 59 additions and 29 deletions

View File

@@ -0,0 +1 @@
import { default } from "foo";

View File

@@ -0,0 +1,4 @@
{
"plugins": ["flow"],
"throws": "default is a reserved word (1:9)"
}

View File

@@ -0,0 +1 @@
import { typeof } from "foo";

View File

@@ -0,0 +1,4 @@
{
"plugins": ["flow"],
"throws": "typeof is a reserved word (1:9)"
}

View File

@@ -0,0 +1 @@
import { typeof } from "foo";

View File

@@ -0,0 +1,3 @@
{
"throws": "typeof is a reserved word (1:9)"
}

View File

@@ -0,0 +1 @@
import { debugger } from "foo";

View File

@@ -0,0 +1,3 @@
{
"throws": "debugger is a reserved word (1:9)"
}

View File

@@ -1,3 +1,3 @@
{
"throws": "Unexpected token (1:26)"
}
"throws": "yield is a reserved word (1:26)"
}

View File

@@ -1,3 +1,3 @@
{
"throws": "Unexpected token (1:25)"
}
"throws": "yield is a reserved word (1:25)"
}

View File

@@ -1,3 +1,3 @@
{
"throws": "Unexpected token (1:46)"
}
"throws": "yield is a reserved word (1:46)"
}

View File

@@ -1,3 +1,3 @@
{
"throws": "Unexpected token (1:29)"
"throws": "yield is a reserved word (1:29)"
}

View File

@@ -1,3 +1,3 @@
{
"throws": "Unexpected token (1:28)"
}
"throws": "yield is a reserved word (1:28)"
}

View File

@@ -0,0 +1 @@
import { type as debugger } from "foo";

View File

@@ -0,0 +1,3 @@
{
"throws": "debugger is a reserved word (1:17)"
}

View File

@@ -0,0 +1 @@
import { type debugger } from "foo";

View File

@@ -0,0 +1,3 @@
{
"throws": "debugger is a reserved word (1:9)"
}

View File

@@ -1,4 +1,4 @@
{
"throws": "Unexpected token (1:14)",
"throws": "delete is a reserved word (1:14)",
"plugins": ["flow", "jsx"]
}