Porting babel-plugin-transform-for-of-as-array into transform-for-of as an option (#6914)
This commit is contained in:
4
packages/babel-plugin-transform-for-of/test/fixtures/error/invalid-option/actual.js
vendored
Normal file
4
packages/babel-plugin-transform-for-of/test/fixtures/error/invalid-option/actual.js
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
let elm;
|
||||
for (elm of array) {
|
||||
console.log(elm);
|
||||
}
|
||||
4
packages/babel-plugin-transform-for-of/test/fixtures/error/invalid-option/options.json
vendored
Normal file
4
packages/babel-plugin-transform-for-of/test/fixtures/error/invalid-option/options.json
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"plugins": [["transform-for-of", { "assumeArray": true, "loose": true}]],
|
||||
"throws": "The loose and assumeArray options cannot be used together in @babel/plugin-transform-for-of"
|
||||
}
|
||||
Reference in New Issue
Block a user