xsburg / vscode-javascript-booster

Sprinkle extra refactorings, code actions and commands over your JavaScript! 🍩 TypeScript and Flow are first class citizens as well!
https://marketplace.visualstudio.com/items?itemName=sburg.vscode-javascript-booster
159 stars 13 forks source link
ide-features javascript javascript-booster typescript vscode vscode-extension

VS Code JavaScript Booster Travis GitHub release Donate

Make your life easier, use code actions to do repetitive tasks for you! They can help a lot, just follow the light bulb πŸ’‘!

This VS Code extension provides various code actions (quick fixes) when editing code in JavaScript (or TypeScript/Flow). Just note the light bulb at the left and press it to learn how you can transform the code under the cursor.

You might want to reassign the default shortcut for the quick fix menu to Alt+Enter if you are moving from WebStorm. Search for editor.action.quickFix command.

New: React and TypeScript-specific code actions πŸš€

Features

Installation

Features

Install through VS Code extensions. Search for JavaScript Booster

Visual Studio Code Market Place: JavaScript Booster

Features

Code actions

Extend/Shrink selections

These two commands allow you to successively select blocks of code so that it's easier to select what you want. Just look at the animation, rather than read this text πŸ€“. Unlike VS Code's embedded commands (editor.action.smartSelect.*), this extension uses an abstract syntax tree under the hood, which provides much more accurate results.

You might want to assign hotkeys for these commands, search for javascriptBooster.extendSelection and javascriptBooster.shrinkSelection. Ctrl+W and Ctrl+Shift+W (⌘W and βŒ˜β‡§W) are used in WebStorm by default.

Smart extend/shrink selection

As this feature is only supported in JavaScript and TypeScript for now, you can configure fallback commands that will be called for other file types instead (VS Code's smartSelect.* by default). They will also be called if the file has fatal syntax errors.

Roadmap

More code actions

New commands

Others

Inspiration

Largely inspired by WebStorm and its variety of code refactorings. The extension uses Babylon to parse the code and then manipulates the abstract syntax tree using jscodeshift.

Contribution

PRs are always welcome. Please refer to the Contribution Guide for tips on how to work with this project. The guide includes basic development workflows like running tests and debugging as well as useful links for creating new code actions.

If you like this project and find it useful, you could also donate to support its development Donate.

Release Notes

14.0.0

Features

In this release: a bunch of new code actions including React and TypeScript; resolve technical debt and do the groundwork for more exciting features!

0.12.0

0.11.0

0.10.0

0.9.0

0.8.0

0.7.0

0.6.0

0.5.0

0.4.0

0.3.0

0.2.0 (Initial release)

Credits

The icon made by Swifticons from www.flaticon.com is licensed by CC 3.0 BY