Nicolò Ribaudo 4e28459a2f
Make @babel/plugin-class-features a normal helper package (#9083)
* Make @babel/plugin-class-features a normal helper package

This effectively disallows using it directly.

* Rename helper

* Style

* Don't add prefix to plugin name

* Move private methods plugin
2018-11-29 16:42:45 +01:00

23 lines
524 B
JavaScript

/* eslint-disable local-rules/plugin-name */
import { declare } from "@babel/helper-plugin-utils";
import {
createClassFeaturePlugin,
FEATURES,
} from "@babel/helper-create-class-features-plugin";
export default declare((api, options) => {
api.assertVersion(7);
return createClassFeaturePlugin({
name: "proposal-private-methods",
feature: FEATURES.privateMethods,
loose: options.loose,
manipulateOptions(opts, parserOpts) {
parserOpts.plugins.push("classPrivateMethods");
},
});
});