-
-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New rule for Aurelia plugins(and server side rendering): fail when using globals, that don't work with aurelia-pal-nodejs #181
Comments
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. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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)The text was updated successfully, but these errors were encountered: