Orion 7.0 – Language Tooling Enhancements

The upcoming Orion 7.0 release has many improvements and enhancements in the language tooling, especially for Javascript development. Here is a list of the more notable changes coming in 7.0!

Updated third party libraries

Many third party libraries have been updated in 7.0:

Improved content assist

JavaScript content assist has been improved in many ways, like allowing proposals inside JSDoc-formatted comments,  improved object support from our indexes and improved built-in type detection.

We can help add JSDoc tags:


JSDoc tag assist

We can show assist for parameters:


Function parameter JSDoc assist

We can show assist for type objects:


Object JSDoc assist

We can show the actual return type of items from our built-in indexes (rather than simply ‘Object’):


Correct index object types

We can also show assist for RegExp literals (finally):


RegExp literal assist

Enhanced ESLint support

Along with the version update to ESLint, we also spent time improving the overall integration support for ESLint. In doing so, we provided new linting rules and some content assist templates / completions to help you craft ESLint directives.

The new no-empty-block rule (off by default) can be used to detect empty code blocks. When an empty block is found you get a pleasant warning in the editor, with a suggestion how to fix it:


Empty code block rule

Another new rule, throw-error, will check to make sure that you only throw error-objects from throw statements. If you fail to do so, you will see the helpful reminder:

Throw an error instead

Throw an error instead

With the change to stop using JSLint/JSHint directives and a linting rule in place to warn you about the unsupported usage, we thought it best to add some content assist completions to help you craft correct ESLint directives.

So now we have ESLint directive templates:


ESLint directive templates

Assist setting up an environment:


ESLint environment assist

Assist disabling / enabling rules:


ESLint rule assist

Parser improvements

In order to provide content assist inside JSDoc blocks, one of the things that we had to do was add recovery support for unclosed / incomplete comment blocks while parsing your source. The new block comment recovery support will parse and recover all complete statements up to the incomplete comment.

In the following example, the declaration can be recovered, but the if-statement cannot (since the comment is also breaking the if-statement):


Recovered from an incomplete comment

Support was also improved to report parsing errors that cause a complete failure to parse, where no tokens at all are being returned from the parse. In the following example we now correctly report the bad ` token:


Bad parse errors properly reported

Improved mark occurrences

A lot of work has gone into improving the accuracy and adding new occurrence support.

We can now show you occurrences of labelled statements:


Labelled statements

Correctly show occurrences in throw statements:


Throw statement occurrences

Mark occurrences in use-before-define and hoisting scenarios:


Use-before-define and hoisting

We even fixed a long standing bug that refused to show occurrences for something that was not defined in the file:

Global occurrences

Global occurrences

Improved web tools

Our support for HTML has been improved with the addition of an HTML outline, which is powered by the htmlparser third party library.

HTML outline

This entry was posted in New & Noteworthy. Bookmark the permalink.