keywords are not allowed as local specifier (#307)
Also fix some error messages to be more specific
This commit is contained in:
1
test/fixtures/es2015/modules/import-invalid-keyword-flow/actual.js
vendored
Normal file
1
test/fixtures/es2015/modules/import-invalid-keyword-flow/actual.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
import { default } from "foo";
|
||||
4
test/fixtures/es2015/modules/import-invalid-keyword-flow/options.json
vendored
Normal file
4
test/fixtures/es2015/modules/import-invalid-keyword-flow/options.json
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"plugins": ["flow"],
|
||||
"throws": "default is a reserved word (1:9)"
|
||||
}
|
||||
1
test/fixtures/es2015/modules/import-invalid-keyword-typeof-flow/actual.js
vendored
Normal file
1
test/fixtures/es2015/modules/import-invalid-keyword-typeof-flow/actual.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
import { typeof } from "foo";
|
||||
4
test/fixtures/es2015/modules/import-invalid-keyword-typeof-flow/options.json
vendored
Normal file
4
test/fixtures/es2015/modules/import-invalid-keyword-typeof-flow/options.json
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"plugins": ["flow"],
|
||||
"throws": "typeof is a reserved word (1:9)"
|
||||
}
|
||||
1
test/fixtures/es2015/modules/import-invalid-keyword-typeof/actual.js
vendored
Normal file
1
test/fixtures/es2015/modules/import-invalid-keyword-typeof/actual.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
import { typeof } from "foo";
|
||||
3
test/fixtures/es2015/modules/import-invalid-keyword-typeof/options.json
vendored
Normal file
3
test/fixtures/es2015/modules/import-invalid-keyword-typeof/options.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"throws": "typeof is a reserved word (1:9)"
|
||||
}
|
||||
1
test/fixtures/es2015/modules/import-invalid-keyword/actual.js
vendored
Normal file
1
test/fixtures/es2015/modules/import-invalid-keyword/actual.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
import { debugger } from "foo";
|
||||
3
test/fixtures/es2015/modules/import-invalid-keyword/options.json
vendored
Normal file
3
test/fixtures/es2015/modules/import-invalid-keyword/options.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"throws": "debugger is a reserved word (1:9)"
|
||||
}
|
||||
@@ -1,3 +1,3 @@
|
||||
{
|
||||
"throws": "Unexpected token (1:26)"
|
||||
}
|
||||
"throws": "yield is a reserved word (1:26)"
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
{
|
||||
"throws": "Unexpected token (1:25)"
|
||||
}
|
||||
"throws": "yield is a reserved word (1:25)"
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
{
|
||||
"throws": "Unexpected token (1:46)"
|
||||
}
|
||||
"throws": "yield is a reserved word (1:46)"
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
{
|
||||
"throws": "Unexpected token (1:29)"
|
||||
"throws": "yield is a reserved word (1:29)"
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
{
|
||||
"throws": "Unexpected token (1:28)"
|
||||
}
|
||||
"throws": "yield is a reserved word (1:28)"
|
||||
}
|
||||
|
||||
1
test/fixtures/flow/type-imports/invalid-import-type-as/actual.js
vendored
Normal file
1
test/fixtures/flow/type-imports/invalid-import-type-as/actual.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
import { type as debugger } from "foo";
|
||||
3
test/fixtures/flow/type-imports/invalid-import-type-as/options.json
vendored
Normal file
3
test/fixtures/flow/type-imports/invalid-import-type-as/options.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"throws": "debugger is a reserved word (1:17)"
|
||||
}
|
||||
1
test/fixtures/flow/type-imports/invalid-import-type/actual.js
vendored
Normal file
1
test/fixtures/flow/type-imports/invalid-import-type/actual.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
import { type debugger } from "foo";
|
||||
3
test/fixtures/flow/type-imports/invalid-import-type/options.json
vendored
Normal file
3
test/fixtures/flow/type-imports/invalid-import-type/options.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"throws": "debugger is a reserved word (1:9)"
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
{
|
||||
"throws": "Unexpected token (1:14)",
|
||||
"throws": "delete is a reserved word (1:14)",
|
||||
"plugins": ["flow", "jsx"]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user