Enable the post-typechecking checks to run on ES2018 code
This is so we can run these check passes before transpiling object rest (which is an ES2018 feature but transpiled with all the ES6 destructuring features)
@@ -1378,7 +1378,7 @@ public final class DefaultPassConfig extends PassConfig {
@Override
protected FeatureSet featureSet() {
- return ES8_MODULES;
+ return ES2018;
}
};
@@ -1418,7 +1418,7 @@ public final class DefaultPassConfig extends PassConfig {
@Override
protected FeatureSet featureSet() {
- return ES8_MODULES;
+ return ES2018;
}
};
@@ -1526,9 +1526,8 @@ public final class DefaultPassConfig extends PassConfig {
};
/**
- * Processes goog.getCssName. The cssRenamingMap is used to lookup
- * replacement values for the classnames. If null, the raw class names are
- * inlined.
+ * Processes goog.getCssName. The cssRenamingMap is used to lookup replacement values for the
+ * classnames. If null, the raw class names are inlined.
*/
private final PassFactory closureReplaceGetCssName =
new PassFactory("closureReplaceGetCssName", true) {
@@ -1541,10 +1540,8 @@ public final class DefaultPassConfig extends PassConfig {
if (options.gatherCssNames) {
newCssNames = new HashMap<>();
}
- ReplaceCssNames pass = new ReplaceCssNames(
- compiler,
- newCssNames,
- options.cssRenamingWhitelist);
+ ReplaceCssNames pass =
+ new ReplaceCssNames(compiler, newCssNames, options.cssRenamingWhitelist);
pass.process(externs, jsRoot);
compiler.setCssNames(newCssNames);
}
@@ -1553,7 +1550,7 @@ public final class DefaultPassConfig extends PassConfig {
@Override
protected FeatureSet featureSet() {
- return ES8_MODULES;
+ return ES2018;
}
};
@@ -1922,7 +1919,7 @@ public final class DefaultPassConfig extends PassConfig {
@Override
public FeatureSet featureSet() {
- return ES8_MODULES;
+ return ES2018;
}
};
@@ -2179,7 +2176,8 @@ public final class DefaultPassConfig extends PassConfig {
};
/** Checks that all constants are not modified */
- private final PassFactory checkConsts = new PassFactory("checkConsts", true) {
+ private final PassFactory checkConsts =
+ new PassFactory("checkConsts", true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new ConstCheck(compiler);
@@ -2187,7 +2185,7 @@ public final class DefaultPassConfig extends PassConfig {
@Override
public FeatureSet featureSet() {
- return ES8_MODULES;
+ return ES2018;
}
};
@@ -2222,7 +2220,7 @@ public final class DefaultPassConfig extends PassConfig {
@Override
public FeatureSet featureSet() {
- return ES8_MODULES;
+ return ES2018;
}
};
@@ -3352,7 +3350,7 @@ public final class DefaultPassConfig extends PassConfig {
@Override
protected FeatureSet featureSet() {
- return ES8_MODULES;
+ return ES2018;
}
};
