Open atsu85 opened 6 years ago
Fully support that, whatever can be automated ist a definitiv win
Maybe this is better suited for the eslint aurelia plugin. https://github.com/bryanrsmith/eslint-plugin-aurelia
Global values can be used in templates using view engine hooks, which are implemented in script. So this can be solved by linting the script using eslint or tslint
I see I didn't know about those hooks. Thank you for explaining.
Motivation
To be able to run Aurelia code on NodeJS (with aurelia-pal-nodejs) in addition to running it in browser, using browser globals (such as
window
and browser DOMElement
) directly should be avoided - instead they should used via Aurelia Platform Abstraction Layer aurelia-pal instead. It would be great if this project could help Aurelia ecosystem to get ready for running code on NodeJS in addtion to browser.Example
Instead of
Element
plugins should useDOM.Element
and instead ofwindow.Intl
they should usePLATFORM.global.Intl
(as You can see in this fix for aurelia-i18n plugin related to this bug report)