Giter VIP home page Giter VIP logo

Comments (10)

Stupremee avatar Stupremee commented on July 25, 2024

If rslint_parse parses the file as a module, the linting passes. Because in your code (if its parsed as a script), the parent.kind() is ERROR and thus will not be counted as a valid kind. This could be easily fixed by just checking for ERROR in the lint.

from rslint.

RDambrosio016 avatar RDambrosio016 commented on July 25, 2024

Oh that is true, and this brings up another point, the linter should not tread into ERROR nodes, it should skip them and their children because the data inside is non-sensical

from rslint.

Stupremee avatar Stupremee commented on July 25, 2024

This is going to be complicated, because many lints use .parent() or .children(), which are not guaranteed to not return ERROR.

from rslint.

RDambrosio016 avatar RDambrosio016 commented on July 25, 2024

that does not matter if the linter does not step into the children of error nodes

from rslint.

Stupremee avatar Stupremee commented on July 25, 2024

Ah yes, that makes sense. Misunderstood your message

from rslint.

RDambrosio016 avatar RDambrosio016 commented on July 25, 2024

Although the file is .mjs so it should be parsing as module 🤔

from rslint.

Stupremee avatar Stupremee commented on July 25, 2024

If I rename it to .mjs and run it, the linting passes

Edit: Nvm it doesn't. 😅 Because EXPORT_DECL is not in the valid kind array.

from rslint.

RDambrosio016 avatar RDambrosio016 commented on July 25, 2024

haha so the issue is still there, although we caught another issue for ERROR nodes

from rslint.

RDambrosio016 avatar RDambrosio016 commented on July 25, 2024

Oh haha, that makes sense, its an easy fix

from rslint.

RDambrosio016 avatar RDambrosio016 commented on July 25, 2024

Fixed in 970df03

from rslint.

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.