Giter VIP home page Giter VIP logo

Comments (16)

RDambrosio016 avatar RDambrosio016 commented on July 25, 2024

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.

zero734kr avatar zero734kr commented on July 25, 2024

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.

zero734kr avatar zero734kr commented on July 25, 2024

My system is Linux Mint 20.1 Ulyssa (or just derivative of Ubuntu)

from rslint.

RDambrosio016 avatar RDambrosio016 commented on July 25, 2024

Yeah we publish all crates first to crates.io then add a release commit which builds binaries

from rslint.

zero734kr avatar zero734kr commented on July 25, 2024

I converted my typescript file to javascript and now is working properly

from rslint.

RDambrosio016 avatar RDambrosio016 commented on July 25, 2024

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.

zero734kr avatar zero734kr commented on July 25, 2024

Ok, no problems. I'll wait for next publish to taste how rslint is good and close this issue after that

from rslint.

zero734kr avatar zero734kr commented on July 25, 2024

I built rslint from source after running the git clone and it's working fine!

from rslint.

suptejas avatar suptejas commented on July 25, 2024

Still waiting for a release 😅 , sometime soon would be great @RDambrosio016

from rslint.

Stupremee avatar Stupremee commented on July 25, 2024

Oh yeah. Totally forgot about a new release. I will try to do a release ASAP.

from rslint.

suptejas avatar suptejas commented on July 25, 2024

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.

RDambrosio016 avatar RDambrosio016 commented on July 25, 2024

You can make a typescript Syntax then give it to parse_with_syntax. Other functions assume default syntax which is just js

from rslint.

suptejas avatar suptejas commented on July 25, 2024

@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.

RDambrosio016 avatar RDambrosio016 commented on July 25, 2024

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.

suptejas avatar suptejas commented on July 25, 2024

Right, makes sense

from rslint.

Stupremee avatar Stupremee commented on July 25, 2024

TS support is now in 0.3.0

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.