A Babel plugin (v0.1.1) that transforms JavaScript conditional expressions (ternary, logical AND/OR) into if/else statements for improved readability. It is a niche tool focused solely on beautifying ternaries, with no updates since 2021 and low maintenance. Unlike general formatters (Prettier) or codemods (jscodeshift), it performs a specific AST transformation. Intended for build-time use in Babel pipelines.
npm install babel-plugin-transform-beautifierVerified import paths — ran on the pinned version, not inferred.
Shows how to install and configure the plugin in a Babel config file to beautify ternaries.
Use an alternative like manual refactoring or a custom codemod.
Review transformed output manually; expected beautification may not apply.
Ensure plugin order and test output with other plugins in pipeline.
Run 'npm install --save-dev babel-plugin-transform-beautifier' and check your babel config plugin name.
In babel.config.js, use plugins: ['babel-plugin-transform-beautifier'] (string, not a function or variable).
No dependency data recorded yet.