Skip to content
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

- Enhanched the require rule with an extra required attribute from.bind, this or the from are now required #194

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

LittleGnome
Copy link

@LittleGnome LittleGnome commented Jan 14, 2020

  • Enhanched the require rule with an extra required attribute from.bind, this or the from are now required.
  • Removed unused imports/parameters;
  • Some other code clean up and update the README.MD;

Make sure you check the following:

  • you are making a pull request for the develop branch
  • unless trivial, a corresponding issue exists for this PR (reference it)
  • if this PR fixes the issue, then include fix #
  • you've ran gulp test and it passes the lint
  • tests don't fail (except tests in 'failing.spec.ts')

Note: Requests to pull into master from a fork will be rejected.

…nd, this or the from are now required.

- Removed unused imports/parameters;
- Some other code clean up and update the README.MD;
@EisenbergEffect
Copy link
Contributor

@LittleGnome We actually don't support binding the from attribute of the require element. The require element is much like an ES2015 import and must be statically determined by the template compiler.

@LittleGnome
Copy link
Author

LittleGnome commented Jan 15, 2020

But when we use it as followed, it's totally fine, but Aurelia template linter doesn'
t accept is.
<template repeat.for="requiredModule of requiredModules"><require from.bind="requiredModule"></require><template>
Is there another way to configure or write something, so we can still use the Aurelia template linter and still have the require rule?

@EisenbergEffect
Copy link
Contributor

@LittleGnome I have to be honest, I'm not sure how that is working. Let me loop in @bigopon . Perhaps there was some change at some point I'm unaware of that enables that to work.

@LittleGnome
Copy link
Author

Hello @bigipon, do you have some time to look into this pull request?

@bigopon
Copy link
Member

bigopon commented Jan 19, 2020

Oops, missed this. Ill ha e a look in a few hours


if (name != 'require')
return;

let result = attrs.find(x => (<any>x).name == 'from');
let result = attrs.find(x => x.name === 'from' || x.name === 'from.bind');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't support fromt.bind in <require/>, may I know why this was added?

@EisenbergEffect EisenbergEffect removed their request for review January 28, 2022 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants