Giter VIP home page Giter VIP logo

Comments (4)

MeirionHughes avatar MeirionHughes commented on June 21, 2024

hmmm, It would be helpful if you could whittle down your html until you can find something that triggers it; then post the related view-model property for it.

from template-lint.

bondib avatar bondib commented on June 21, 2024

OK, so I found the issue.
It's this part from the HTML above:
<a click.delegate="vg.collapsed = !vg.collapsed">

So i agree the code isn't the best - and that this logic should have been placed in a function in the VM, and not inline as it's - but still the linter shouldn't fail on this - as linter wise - it's legit as the code works.

I do understand why it's complicated to validate - so I suggest that instead of validating this type of code (which is complex and not a good approach generally speaking) - maybe a warning should be written - that it's not recommended and that the linter can't verify this type of code...

from template-lint.

MeirionHughes avatar MeirionHughes commented on June 21, 2024

Generally if something isn't supported I'll at least triage it to stop the warnings. What is the view-model property for vg and what is vg type?

from template-lint.

bfil avatar bfil commented on June 21, 2024

Had the same issue, since the code seem to be failing here: https://github.com/MeirionHughes/aurelia-template-lint/blob/develop/source/rules/binding.ts#L236

..because of args is undefined, it looks like it could be easily patched. I could open a PR but I'm not sure in what way this should behave, would reporting the issue as a warning be good enough?

For now, I've monkey patched it by doing access.args || [] so that it skips the problematic parts of the templates but at least it still proceeds and checks the rest instead of just throwing an error.

from template-lint.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.