Add log-level, add verbose performance logsĪdd new refactoring: Replace ?: with if-else (#19):įixed 'Remove redundant else' refactoring not to appear when there is not else statement (#21).Switch to Yarn (for selective deps resolution).Use strict TypeScript in the language server.React: convert to regular function now supports React function components.replace-with-regular-string should not trigger on tagged template strings.Conditions: Merge nested if statements declaration.Function: Convert function declaration to arrow function.Function: Convert arrow function to regular function.TS: Convert type union of strings to string-enum.React: Convert function to React.FunctionComponent.React: Wrap component function with mo().React: Wrap component function with React.forwardRef().React: Wrap function into useCallback() hook.In this release: a bunch of new code actions including React and TypeScript resolve technical debt and do the groundwork for more exciting features! If you like this project and find it useful, you could also donate to support its development. The guide includes basic development workflows like running tests and debugging as well as useful links for creating new code actions. Please refer to the Contribution Guide for tips on how to work with this project. The extension uses Babylon to parse the code and then manipulates the abstract syntax tree using jscodeshift. Largely inspired by WebStorm and its variety of code refactorings. Support loading code actions from user workspace: users can create their own, project-related refactorings! □.Navigate to related files (Hello.jsx -> Hello.scss, ).TS: Generate missing switch cases for enum.TS: Change member access (public -> private etc).They will also be called if the file has fatal syntax errors. Ctrl+W and Ctrl+Shift+W (⌘W and ⌘⇧W) are used in WebStorm by default.Īs 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). You might want to assign hotkeys for these commands, search for javascriptBooster.extendSelection and javascriptBooster.shrinkSelection. Unlike VS Code's embedded commands ( .*), this extension uses an abstract syntax tree under the hood, which provides much more accurate results. Just look at the animation, rather than read this text □. These two commands allow you to successively select blocks of code so that it's easier to select what you want. React: Convert function to React.FunctionComponent declaration (new).React: Wrap component function with mo() (new).React: Wrap component function with React.forwardRef() (new).Wrap function into useCallback() hook (new).Convert type union of strings to string-enum (new).Convert string-enum to type union (new).Run selected await statements in parallel with Promise.all.Convert function declaration to arrow function (new).Convert arrow function to regular function (new).Add parens to single arrow function parameter. Convert shorthand arrow function to statement.Replace template string with regular string.Split into declaration and initialisation.Visual Studio Code Market Place: JavaScript Booster Features Code actions New: React and TypeScript-specific code actions □ You might want to reassign the default shortcut for the quick fix menu to Alt+Enter if you are moving from WebStorm. Just note the light bulb at the left and press it to learn how you can transform the code under the cursor. This VS Code extension provides various code actions (quick fixes) when editing code in JavaScript (or TypeScript/Flow). Make your life easier, use code actions to do repetitive tasks for you! They can help a lot, just follow the light bulb □!
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |