- no-undef: Warn when a global variable has not been defined
- no-undef-expression: Warn when a function (member expression) has not been defined
- no-unused-vars: Warn when declared variables are not used.
- unknown-require: Unknown required library
- type-checked-consistent-return: Discouraged inconsistent returns
So we can now in many cases tell you that you are using a function that doesn’t exist. Especially helpful when you mistype the name or use the wrong casing.
Make the tools consumable
Improved Tern integration
In Orion 12.0 we moved the remainder of our client-side services to be Tern plugins.
These new plugins include:
- Templates / templating
The move to be more Tern-centric with our features carries many benefits, but most importantly it allows us to cut down on message passing, improve memory use and make the features more portable.
ECMA 2015 support
Orion 12.0 supports all of the ECMA 2015 specification like arrow functions, import/export statements and classes.
The tooling completely understands the new language syntax with new quick fixes and code templates also being available to get you started. The linting rules have also been updated to respect the new ECMA 2015 code patterns.
Outlining has been updated:
Occurrences has been updated:
Linting has been updated:
We also support import and export statements which require the source type to be “module”. This is set through the .tern-project file – and you can use a handy quickfix to write it all for you.
Support for ESLint project configuration files
Users can now include .eslintrc files in their projects. These files can configure all of the ESLint settings that your files are validated with, including rule severities.
When this file is present, the rule values will override any workspace settings. If you go from editing your project to changing settings the page will warn you that an .eslintrc file is present.
We support other forms of ESLint configuration too, such as settings in package.json. There is a hierarchy of configuration files that you can use. Read the full details on ESLint’s configuration page.
Support for in-project definition files
The tooling will include all the type information found in your definitions to improve content assist, tooltip hovers and more.
Updated third-party libraries
Most of our third-party libraries have been refreshed:
- Acorn 3.1.0
- Doctrine 1.2.1
- ESrecurse 4.1.0
- Estraverse 4.1.1
- Escope 4.2.0
- Tern 0.18.0
A notable change to our consumed library lineup is that we have discontinued use of the Esprima parser in favour of Acorn. There are many reasons for the switch, but the main reasons are:
- Acorn has complete ECMA 2015 support (with recovery for most of it).
- We can easily extend the Acorn parser via its plugin mechanism, so there is no need to edit parser code to have our Orion customizations.
- Acorn has robust recovery support right out of the box (no more editing the parser to hack our own in).