Comments (16)
Did you build from source? It supports TypeScript in the next version but i havent published 0.3 yet because i am lazy i have a couple more things to do
from rslint.
I installed initially from cargo, but after that error, I tried to install from releases pages too, but apparently there is no difference between installing from cargo or prebuilt binaries from releases page
from rslint.
My system is Linux Mint 20.1 Ulyssa
(or just derivative of Ubuntu
)
from rslint.
Yeah we publish all crates first to crates.io then add a release commit which builds binaries
from rslint.
I converted my typescript file to javascript and now is working properly
from rslint.
I apologize for not having published a version which could actually lint TS before putting it in the readme. If you'd like to still try it you can git clone then either cargo build a binary or cargo run and feed it a path.
from rslint.
Ok, no problems. I'll wait for next publish to taste how rslint is good and close this issue after that
from rslint.
I built rslint from source after running the git clone and it's working fine!
from rslint.
Still waiting for a release 😅 , sometime soon would be great @RDambrosio016
from rslint.
Oh yeah. Totally forgot about a new release. I will try to do a release ASAP.
from rslint.
Also, if you don't mind me asking - I'm trying to basically use rslint to validate some code, though I want to call it directly through Rust.
So initially, I used:
let result = rslint_parser::parse_text_lossy(read_to_string(&f).unwrap().as_str().trim(), 0);
The above code worked just fine for Javascript files, though it didn't work for TS files.
I then moved the crates locally and imported the raw code, instead of downloading the crate from crates.io because the latest release didn't support TS yet.
The above code still doesn't look like it supports TS. What can I use to only validate syntax and stuff in TS and JS files? Which function should I use (I also want to display errors, and result.errors()
gave me just that)?
from rslint.
You can make a typescript Syntax
then give it to parse_with_syntax
. Other functions assume default syntax which is just js
from rslint.
@RDambrosio016 also was wondering, what does the file_id
mean? Until now, I've just filled in 0
as the value, but wanted to understand its purpose
from rslint.
its used for rendering errors, at the start of linting, we build a map of IDs to file data in parallel, each file stores its line indices, line starts, etc. This info is then used for rendering errors, recomputing line info for each file for each error gets slow real quick, especially when you have big files
from rslint.
Right, makes sense
from rslint.
TS support is now in 0.3.0
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.