|ESLint Adds ES2020 Support|
|Written by Ian Elliot|
|Thursday, 25 June 2020|
ESLint can be used for code analysis using linting, a type of static analysis. It was created to allow developers to create their own linting rules, so all rules are completely pluggable. The default rules are written just like any plugin rules would be. ESLint is an OpenJS Foundation project.
The major changes to the new version start with the addition of support for ES2020. Given the relatively minor changes to ES2020, the changes in ESLint were largely changes to rules to add ES2020 BigInt support. The latest release also adds ES2020 syntax support for several language features in the default parser and core rules, including the Nullish coalescing operator and for import.meta. The developers say they are aware that optional chaining support is still missing, and they're working on it with the aim of adding it to the next minor release.
Another improvement is a new ESLint class that provides an asynchronous API to provide an alternative to the CLIengine class. This has been blocking the implementation of features such as parallel linting and supporting ES modules in shareable configs/parsers/plugins/formatters. The new ESLint class provides an asynchronous API that ESLint core will use from here onwards. The developers say CLIEngine will remain in core for the foreseeable future but may be removed in a future major version.
The other main change of note is the dropping of support for Node.js 8, which reached end-of-life in December 2019. Taking advantage of the change, the developers have moved ten Node.js specific rules from the core to the eslint-plugin-node plugin.
The 7.0 release of ESLint was slow to appear by ESLint standards, and the original creator ESLint, Nicholas Zakas, apologised, saying:
"ESLint v7.0.0 took a long time to release. We know the five-month lag between releases wasn’t good for the project or community. We are looking at what went wrong and how to not repeat this for future major releases. We try to limit major releases to once per year. We try to do regular updates every two weeks, though, and we haven’t done that in five months. That’s what we need to fix."
or email your comment to: firstname.lastname@example.org
|Last Updated ( Thursday, 25 June 2020 )|