Do not warn for loose of class features in preset-env (#12898)
This commit is contained in:
parent
b17231e1af
commit
9a1b59f1f9
@ -29,6 +29,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "workspace:*",
|
||||
"@babel/helper-plugin-test-runner": "workspace:*"
|
||||
"@babel/helper-plugin-test-runner": "workspace:*",
|
||||
"@babel/preset-env": "workspace:*"
|
||||
}
|
||||
}
|
||||
|
||||
@ -44,7 +44,7 @@ export function createClassFeaturePlugin({
|
||||
const constantSuper = api.assumption("constantSuper");
|
||||
const noDocumentAll = api.assumption("noDocumentAll");
|
||||
|
||||
if (loose) {
|
||||
if (loose === true) {
|
||||
const explicit = [];
|
||||
|
||||
if (setPublicClassFields !== undefined) {
|
||||
|
||||
@ -0,0 +1,3 @@
|
||||
class A {
|
||||
foo;
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
{
|
||||
"validateLogs": true,
|
||||
"presets": [["env", { "shippedProposals": true }]],
|
||||
"assumptions": {
|
||||
"setPublicClassFields": true
|
||||
},
|
||||
"targets": "chrome 70"
|
||||
}
|
||||
@ -0,0 +1,6 @@
|
||||
class A {
|
||||
constructor() {
|
||||
this.foo = void 0;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1 @@
|
||||
|
||||
@ -0,0 +1,3 @@
|
||||
class A {
|
||||
foo;
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
{
|
||||
"validateLogs": true,
|
||||
"presets": [["env", { "loose": true, "shippedProposals": true }]],
|
||||
"assumptions": {
|
||||
"setPublicClassFields": true
|
||||
},
|
||||
"targets": "chrome 70"
|
||||
}
|
||||
@ -0,0 +1,6 @@
|
||||
class A {
|
||||
constructor() {
|
||||
this.foo = void 0;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1 @@
|
||||
|
||||
@ -429,6 +429,7 @@ __metadata:
|
||||
"@babel/helper-plugin-test-runner": "workspace:*"
|
||||
"@babel/helper-replace-supers": "workspace:^7.13.0"
|
||||
"@babel/helper-split-export-declaration": "workspace:^7.12.13"
|
||||
"@babel/preset-env": "workspace:*"
|
||||
peerDependencies:
|
||||
"@babel/core": ^7.0.0
|
||||
languageName: unknown
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user