Development environment: WebStorm 2021.2 is actionistic when saving

Share your love

JetBrains traditionally opens the round of updates to development environments with WebStorm. The now published version 2021.2 also updates the preview in the browser when saving, even beyond the live edit mode. In addition, the actions that the IDE takes care of before saving are now summarized in one place. Documentation in JSDoc can now contain TypeScript type information, and the automatic imports extend beyond those for ES6.

WebStorm has long had a web server on board that allows HTML files to be previewed in any browser. The IDE recently updated the View | Open in Browser opened page automatically when developers save the associated HTML, CSS or JavaScript content. The procedure is similar to the live edit functionwhich, however, is limited to Chrome and debug mode.

The view Preferences/Settings | Tools | Actions on Save now bundles all actions that WebStorm should automatically perform when saving files. In addition to the functions already available in older releases, such as running the Prettier code formatting tool, imports can be optimized or the code re-formatted, among other things.

The newly introduced reformatting of the code can either be carried out for the entire file or only the changed lines.

(Image: JetBrains)

After the previous version already brought some additions for JSDoc, the current release extends the integration of type information in comments. It recognizes TypeScript syntax in JSDoc blocks within .js files and uses them to reflect the type definitions. The IDE also knows additional syntactic constructs and can now include optional properties in typedef– Display declarations correctly.

The development environment can evaluate type declarations from TypeScript within JSDoc comments in .js files.

(Image: JetBrains)

In addition, the IDE extends the inclusion of automatic imports beyond ES6 modules. WebStorm 2021.2 adds suitable require-Instructions on autocompletion.

With the key combination Strg | Alt | J a marked code block can be converted into an arrow function. The abbreviation arf converts the development environment when you press the TabKey to an empty arrow function.

Other innovations in version 2021.2 such as the code check before a commit and the preview tab in the debugger can be found on the WebStorm blog. JetBrains offers all IDEs in a subscription model, with the price dropping within the first three years. WebStorm costs in the first year for individual developers 59 euros and for companies 129 euros per developer station. From the third year the annual price is 35 euros or 77 euros per user. Unlike IntelliJ IDEA, there is no free version for WebStorm. However, operators of open source projects, pupils, students and teachers as well as non-profit organizations can get a free variant request the full JetBrains Toolbox.


Article Source

Read Also   The Conti-Leak: Operating Instructions for Ransomware
Share your love