WebStorm 2018.2.6 is now available

WebStorm 2018.2.6 is now available! With WebStorm 2018.3 coming next week, it’s the last bug-fix update for version 2018.2.

You can update to it using Toolbox App or from the IDE. You can also download WebStorm 2018.2.6 from our website.

Here are the fixes available in WebStorm 2018.2.6:

  • The Search everywhere dialog on Linux no longer closes when you press Enter (IDEA-200654)
  • The usual UI for Find in path on Linux is now back (IDEA-200704)
  • On macOS Mojave, the input no longer freezes after adding the accented characters from the popup (JRE-998)

Please also see the Release notes for this update.

Your WebStorm Team

Posted in Release Announcements | Tagged | Leave a comment

Testing with Jest in WebStorm

Jest, the testing platform developed by Facebook, is becoming more and more popular with each day, especially for testing React applications. Jest is fast, easy to get started with, and has lots of features (such as snapshot testing and test coverage) available out of the box.

In WebStorm we wanted to streamline the whole testing workflow and make writing, running, and debugging tests with Jest even smoother and easier. Let’s see how WebStorm can help you test your app with Jest.

As an example, we’ll use the react-dropzone project that uses Jest and Enzyme. Enzyme helps you manipulate your React components while testing.

We won’t go into the details of installing and setting up Jest in a project. For that, we recommend Jest’s official documentation and this blog post on testing React apps.

Configure code completion

You might have noticed that some of the global Jest methods (like describe and beforeEach) in JavaScript files are marked as unresolved in the editor. To fix that, install the TypeScript type definition files for Jest: Go to Preferences | Languages & Frameworks | JavaScript | Libraries, click Download on the right-hand side of the dialog, then search for Jest in the list and click Install. Or add @types/jest to devDependencies in project’s package.json.

JavaScript libraries configuration dialog in WebStorm

This happens because Jest defines these methods in the global scope – so you don’t need to import them in each test file. But it also makes it harder for WebStorm to learn about them from the static analysis of the Jest sources – that’s why they are marked by default as unresolved.

Run tests

Create a run configuration to run all tests in the project
First, let’s run all the tests we have in our project. We need to create a run/debug configuration:

  • in the menu Run, select Edit configurations
  • then click + and select Jest from the drop-down list

Usually, you don’t have to change anything in the configuration, but if there’s a Jest configuration file in the project or you need to pass additional flags to Jest, you should do so in this configuration.

Run debug configuration for running all Jest tests Continue reading

Posted in Tutorials | Tagged , , , | 4 Comments

WebStorm 2018.3 EAP #8: support for Vuetify, move CSS ruleset, JSON improvements

WebStorm 2018.3 Early Preview build #8 is now available!

If you’re unfamiliar with our Early Access Program or if you want to catch up on all the new features, check out the previous EAP blog posts.

Toolbox App is the easiest way to get EAP builds. You can also get notified right from the IDE when a new EAP build is available: go to Preferences | Appearance & Behavior | System Settings | Updates and select “Automatically check updates for Early Access Program”.

Download WebStorm 2018.3 EAP

Important! WebStorm EAP builds are not fully tested and might be unstable.

Here are some of the highlights of WebStorm 2018.3 EAP #7 (build 183.3975.16). For the full list of issues fixed in this update, see the Release Notes.

Support for Vuetify

WebStorm now provides code completion for components from Vuetify version 1.1 or above. Type the name of a component name in the template section of the .vue file or press Ctrl-Space for a list of all the components and then select the one you need.

vuetify-components

AngularJS improvements

We know that many people still use AngularJS, that’s why we’ve fixed the problem which was most voted for that relates to the AngularJS support in WebStorm: completion and resolve for $ctrl or the name defined, using the controllerAs property in the template.

controlleras Continue reading

Posted in Early Access Preview | Tagged , , , , | Leave a comment

WebStorm 2018.2.5 is now available

WebStorm 2018.2.5 is now available! Update to it using Toolbox App or from the IDE. You can also download WebStorm 2018.2.5 from our website.

This update fixes a performance problem with the TypeScript projects caused by the links to the files outside the project (WEB-34669).

From the IntelliJ platform, there are fixes related to logging into the GitHub account (IDEA-198120), the Find in path dialog (IDEA-198588;  the problem still persists on Windows 7, we are currently working on it; as a workaround on Linux with Gnome, we have enabled the old layout for this dialog, the usual UI will be back in WebStorm 2018.3) and the input of the accented characters in popups.

Please also see the Release notes for this update.

Your WebStorm Team

Posted in Release Announcements | Tagged | 9 Comments

WebStorm 2018.3 EAP #7: GitHub Pull Requests, HTML accessibility inspections

WebStorm 2018.3 Early Preview build #7 is now available!

If you’re unfamiliar with our Early Access Program or if you want to catch up on all the new features, check out the previous EAP blog posts.

Toolbox App is the easiest way to get EAP builds. You can also get notified right from the IDE when a new EAP build is available: go to Preferences | Appearance & Behavior | System Settings | Updates and select “Automatically check updates for Early Access Program”.

Download WebStorm 2018.3 EAP

Important! WebStorm EAP builds are not fully tested and might be unstable.

Here are some of the highlights of WebStorm 2018.3 EAP #7 (build 183.3795.15). For the full list of issues fixed in this update, see the Release Notes.

GitHub Pull Requests

This update brings with it an exciting new feature – GitHub Pull Requests. In the menu VCS – Git select View Pull Requests to open a new tool window with a list of all the pull requests in your project. You can see the description, assignee, labels, and changed files from the pull request. Right click on the pull request to create a new local branch from it.

View GitHub Pull Requests

We plan to add further features like merge, close, comment, and more in the upcoming releases.

Accessibility inspections for HTML

To help you to write more accessible HTML code, we’ve added a bunch of new inspections that are based on recommendations from the Web Content Accessibility Guidelines 2.0 (WCAG) developed by W3C. Even though these inspections can’t guarantee that the resulting website is going to be 100% accessible, we still think that they can help and have a lot of value. Continue reading

Posted in Early Access Preview | Tagged , , , , , | 7 Comments

WebStorm 2018.3 EAP #6: debugging Node.js workers, high-contrast theme, new code style options for style sheets

WebStorm 2018.3 Early Preview build #6 is now available!

If you’re unfamiliar with our Early Access Program or if you want to catch up on all the new features, check out the previous EAP blog posts.

Toolbox App is the easiest way to get EAP builds. You can also get notified right from the IDE when a new EAP build is available: go to Preferences | Appearance & Behavior | System Settings | Updates and select “Automatically check updates for Early Access Program”.

Download WebStorm 2018.3 EAP

Important! WebStorm EAP builds are not fully tested and might be unstable.

Here are some of the highlights of WebStorm 2018.3 EAP #6 (build 183.3647.15). For the full list of issues fixed in this update, see the Release Notes.

Debugging Node.js worker thread

Node.js 10.5 introduced a new experimental feature – worker threads, which can be used for CPU-intensive tasks (check out this blog post for a great overview of the feature).

WebStorm now provides code completion for the worker threads API and allows you to debug workers. Debugging workers is available in Node.js 10.12 that was released today. You also need to pass the –experimental-worker flag to the node.

When debugging workers in WebStorm, you will see in what thread the breakpoint was hit and you will be able to switch between threads to see the call stack and variables.

Debugger tool window when debugging node workers

New code style options for style sheets

We have updated the code style options for style sheet languages. First, each language now has its own configuration with a full set of options. Before, most of the options were inherited from the CSS code style and only indents could be configured for each language. Continue reading

Posted in Early Access Preview | Tagged , , , , , , , , | 2 Comments

WebStorm 2018.2.4 is now available

WebStorm 2018.2.4 is now available! Update to it using Toolbox App or from the IDE, or download WebStorm 2018.2.4 from our website.

This update brings a bunch of improvements in the CoffeeScript support, including the final fix for the problem with parsing the slash symbol (WEB-15683).

For the full list of issues addressed in this bug-fix update, please refer to the Release notes.

Your WebStorm Team

Posted in Release Announcements | Tagged , | Leave a comment

WebStorm 2018.3 EAP #5: new intentions and inspections, TypeScript 3.1

WebStorm 2018.3 Early Preview build #5 is now available!

If you’re unfamiliar with our Early Access Program or if you want to catch up on all the new features, check out the previous EAP blog posts.

Toolbox App is the easiest way to get EAP builds. You can also get notified right from the IDE when a new EAP build is available: go to Preferences | Appearance & Behavior | System Settings | Updates and select “Automatically check updates for Early Access Program”.

Download WebStorm 2018.3 EAP

Important! WebStorm EAP builds are not fully tested and might be unstable.

Without further ado, here are the new features you can and should try in this week’s EAP (build 183.3283.12).

Convert a function to a variable holding arrow function

You can now very easily convert a function to a variable that holds an arrow function. Press Alt-Enter on the name in the function definition and select the corresponding intention!

convert-to-var-and-arrow-function

The new intention also works for methods in classes. Here’s an example with a React component: substitute an arrow function for the event handler with the field, and you can now remove the binding in the constructor.

convert-to-field-with-arrow-function

Better ‘null’ and ‘undefined’ check

With the new inspection called Object in ‘null’ or ‘undefined’, WebStorm can now better detect situations when you will get a TypeError because a method is invoked on a value that is undefined or null, or it is passed to a function, or its property is used. Continue reading

Posted in Early Access Preview | Tagged , , , | 10 Comments

WebStorm 2018.3 EAP #4: Git Submodules, Live Edit without Chrome extension

It’s time for the fourth WebStorm 2018.3 Early Preview build!

If you’re unfamiliar with our Early Access Program or if you want to catch up on all the new features that were introduced last week, check out the previous EAP blog posts.

Toolbox App is the easiest way to get the EAP builds. You can also get notified right from the IDE when a new EAP build is available: go to Preferences | Appearance & Behavior | System Settings | Updates and select “Automatically check updates for Early Access Program”.

Download WebStorm 2018.3 EAP

Important! WebStorm EAP builds are not fully tested and might be unstable.

Here are some of the highlights of WebStorm 2018.3 EAP #4 (build 183.2940.11).

Git Submodules

WebStorm 2018.3 now supports working with Git submodules!

When you clone a repository that has submodules, WebStorm will clone the root repo and all its submodules. Moreover, when you update your project, all the submodules will now be correctly updated according to their state. The Diff, History, and Conflict resolution now all work for submodule folders too.

Live Edit without Chrome extension

For a while now, WebStorm has included a feature called Live Edit that worked during the JavaScript debug session to allow you to see the changes you made in your HTML and CSS files immediately in the browser. To use it, WebStorm required you to install the “JetBrains IDE Support” Chrome extension.

Starting with WebStorm 2018.3, you can use the Live Edit feature without installing the plugin: open the HTML file you want to “live edit” and in its context menu select Debug. This will start a JavaScript debugger in WebStorm and open your file in a new instance of Chrome. As you start editing your HTML code or the linked CSS file, you will see the changes you make in the browser, without ever having to reload the page. Continue reading

Posted in Early Access Preview | Tagged , , , | 5 Comments

WebStorm 2018.3 EAP #3: improved Angular support and better completion for versions in package.json

The third WebStorm 2018.3 Early Preview build is now available!

If you’re not familiar with our Early Access Program or if you want to catch up on the new features introduced last week, check out the previous EAP blog posts.

Toolbox App is the easiest way to get the EAP builds. You can also get notified right from the IDE when a new EAP build is available: go to Preferences | Appearance & Behavior | System Settings | Updates and select “Automatically check updates for Early Access Program”.

Download WebStorm 2018.3 EAP

Important! WebStorm EAP builds are not fully tested and might be unstable.

Here are some of the highlights of WebStorm 2018.3 EAP #3 (build 183.2635.17).

Major improvements in Angular support

For the past few weeks we’ve been working on completely re-implementing support for the Angular template language – we’ve written a new parser and lexer, and improved how the metadata available in the Angular sources is used for coding assistance for pipes and type evaluation.

As a result of these changes, we’ve been able to improve the overall experience of working with templates (both inline templates in the TypeScript files and external templates in the HTML files) and fixed a bunch of known issues.
Here’re some of the improvements that are already available:

  • Code completion and the resolve for variables inside HTML templates have become much more precise. This also includes a fix for the problem where some variables were being marked as unused (WEB-33907 and WEB-34522) and another where private properties created in the constructor were marked as unresolved in the templates (WEB-23606).
  • In general, code completion in expressions inside templates is now more type-accurate. For example, here WebStorm knows about the variable’s type and can provide better suggestions for its properties:type-aware-completion-in-templates
  • Completion and resolve for template reference variables also works better now, the unused variable inspection is more accurate and the Rename refactoring works correctly:templare-reference-vars
  • Much better code assistance when using pipes and async pipes (WEB-34352, WEB-27239, and more). For example, WebStorm will suggest the available pipes:completion-for-pipes
  • Improved coding assistance for the *ngFor microsyntax and in the *ngFor context:ngfor-context-completion
  • Performance has also been improved, thanks to the better caching that WebStorm can do with the new implementation.

On our tracker you can file a list of over 40 issues related to the Angular support that have been fixed.

Completion for previous package versions in package.json

For the dependencies in a package.json WebStorm now provides more suggestions for the available versions. After you’ve added the name of the dependency, you will first see suggestions for the latest versions for each tag.

package-json-version-latest

Now, if you press Ctrl-Space or start typing a different version number, WebStorm will provide you with suggestions of all the previous versions of the package.

package-json-all-versions Continue reading

Posted in Early Access Preview | Tagged , , | 1 Comment