WebStorm 2018.3: improved Angular support, better autoimports, GitHub Pull Requests, and more

⭐️WebStorm 2018.3 is now here!⭐️

WebStorm 2018.3 brings lots of exciting new features and enhancements across the board. Much-improved Angular support, GitHub Pull Requests, debug for Node.js worker threads, and lots more await!

Explore the top new features and download WebStorm 2018.3 on our website.

In this blog post we would like to share with you the detailed release notes for the WebStorm 2018.3 update. They are compiled from the EAP blog posts that we’ve been publishing here for the past two months.

Here are the features and improvements grouped by the WebStorm subsystems:

  • JavaScript and TypeScript support: autoimports in JavaScript for symbols from the project’s dependencies, parameter hints in JavaScript, convert to a variable with arrow function, better ‘null’ and ‘undefined’ checks, suggestions for variable names, and TypeScript 3.1.
  • HTML and JSON support: accessibility inspections for HTML, improved Remove action for HTML and JSX tags, and improvements in JSON support.
  • Style sheets: Extract ruleset and move it to another file, new code style options, and updated inspection for CSS shorthand properties.
  • Development with Angular: major improvements in the Angular templates support and fixes in AngularJS support.
  • Development with React: completion for lifecycle methods and new inspection for the undefined components.
  • Development with Vue.js: support for Vuetify.
  • Node.js development: completion for previous package versions in package.json and debugging Node.js worker threads.
  • Editor: multiline Todos, indent size in the status bar, and disabling code formatting for specific files and folders.
  • Accessibility: new high-contrast UI theme and screen reader support for gutter icons.
  • Version Control: Git submodules, tool window for GitHub Pull Requests, and better support for precommit hooks.
  • Linters integrations: suppress comments for TSLint rules, linting TypeScript files with ESLint, and an option to override severity from ESLint or TSLint config.
  • Debugging: Live Edit without Chrome extension, and adding multiple variables to debugger’s watches.
  • Testing: Structure view for test files, Go to failure for tests, and running a single Protractor test or suite.
  • Other IDE improvements: unified Search popup, a new plugin configuration, and drag folder to Welcome screen to open it.

Download WebStorm 2018.3

JavaScript and TypeScript support

Autoimport symbols from the project’s dependencies

We have extended the autoimports in JavaScript files to symbols defined in the project’s dependencies. This will work if there’s a TypeScript definition file present inside the package (like in moment or redux) or if the package contains sources written as ES modules.

auto-import-from-node-modules

And of course, autoimports in JavaScript work for symbols exported in the ES modules in your project. Continue reading

Posted in Release Announcements | Tagged , , , , , , , , , , , , | 7 Comments

WebStorm 2018.2.6 is now available

WebStorm 2018.2.6 is now available! Stay tuned for WebStorm 2018.3 that is coming next week.

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 | 1 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 , , , | 6 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