Skip to content

New rule for Aurelia plugins(and server side rendering): fail when using globals, that don't work with aurelia-pal-nodejs #181

@atsu85

Description

@atsu85

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 DOM Element) 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 use DOM.Element and instead of window.Intl they should use PLATFORM.global.Intl (as You can see in this fix for aurelia-i18n plugin related to this bug report)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions