Power Apps checker now analyzes modern web syntax (up to ES9)
Historically, Power Apps checker only supported parsing up to ES5 syntax. Any use of syntax changes introduced in more recent versions of ECMAScript standard were not able to be parsed and thus would return a result of web-unsupported-syntax for the web resource being analyzed.
Introducing ESLint for web resources
To ensure we can continue to offer the broadest analysis coverage possible as the ECMAScript syntax evolves, we recently migrated to using ESLint as our primary web language analysis engine and converted all of our existing web language rules to be packaged in a rules plugin. What this means to you is that we now offer the ability to parse modern web syntax and will be able to remain aligned with a broadly adopted, open-source linter to promote consistent results. Another benefit from this migration is that support for analyzing embedded script in HTML has been improved.
To be more specific, Power Apps checker now supports up to:
- ECMAScript 2018 (ES9) syntax
- ES6 Globals
Use of syntax beyond what is stated above will still result in a web-unsupported-syntax result for the affected web resource.
In addition to rules specific to Power Apps, multiple rules in the solution checker ruleset now correspond to core ESLint rules as follows:
- web-use-strict-mode >> strict (default configuration – function level)
- web-use-strict-equality-operators >> eqeqeq
- web-avoid-eval >> no-eval
- web-remove-alert >> no-alert
- web-remove-debug-script >> no-debugger
- web-remove-console >> no-console
Expect more results
Given that Power Apps checker can analyze more web resources due to broader ECMAScript support, latent issues may now be reported. Individual rules have also been improved for better accuracy, meaning previously reported false positives (or false negatives) may now be reported (or ignored) correctly. The combination of these changes will likely cause the results you see going forward for web resources to vary from previous reports. Fear not! This is to be expected and will ultimately guide you to a healthier state. As always, you can reference our known issues article for latest updates on ES version support and more details on rule-specific behavior.
Another benefit of migrating to an open-source linter is that it provides the opportunity to share our rules with the community. To that end, we are preparing to publish our rules plugin to the public npmjs registry so that you can run our rules (and fixers) at design time in editors such as Visual Studio Code. More to come on that soon… ?
Bottom line, with our migration to ESLint you’ll get all the same rules (some even better than before) with broader coverage and the future potential for earlier detection plus automated fixes. Now, go check those apps again!!