Comments (10)
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.
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.
This is going to be complicated, because many lints use .parent()
or .children()
, which are not guaranteed to not return ERROR
.
from rslint.
that does not matter if the linter does not step into the children of error nodes
from rslint.
Ah yes, that makes sense. Misunderstood your message
from rslint.
Although the file is .mjs
so it should be parsing as module 🤔
from rslint.
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.
haha so the issue is still there, although we caught another issue for ERROR nodes
from rslint.
Oh haha, that makes sense, its an easy fix
from rslint.
Fixed in 970df03
from rslint.
Related Issues (20)
- `ForOfStmt` missing from `ast::Stmt` enum HOT 1
- How to debug in VSCode HOT 6
- WebAssembly! HOT 1
- Logotype
- No binary for v0.3.x release HOT 3
- How can I adjust an AST node? HOT 4
- Default function parameters are incompletely parsed as AssignPattern HOT 1
- Ran `rslint .` in my Projects directory, got an internal linter error HOT 7
- JSX support HOT 4
- Panic in parse_text_lossy
- Panic when using Fixer: assertion failed: `(left == right)` HOT 3
- Internal Linter Error on rslint_parser/src/lossless_tree_sink.rs
- Install error
- docs: http://rslint.org/ is down HOT 2
- 'The parser seems to be recursing forever' at invalid if/else brackets configuration. HOT 1
- Internal error
- How does casting work from untyped nodes to typed nodes when building the linting AST?
- Is this project still under maintenance? HOT 1
- [DOCS] Full file and single statement rslint-ignore statements are identical in documentation
- SyntaxNode#replace_with asserts kind
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rslint.