Quantcast
Channel: ReScript Forum - Latest posts
Viewing all articles
Browse latest Browse all 2592

I'm looking into using ast-grep fo linting ReScript. What rules should I investigate?

$
0
0

Aha! For whatever reason, on my linux machine, it could auto-migrate to the latest version of tree-sitter. On my mac, I was left without that, but managed to add it manually to a fork of the current tree-sitter repo.

Full install instructions for tree-sitter are now:

  • Install tree-sitter (in my case via brew)
> brew install tree-sitter
  • Initialize the tree-sitter config, which, in my case, spit out a file at ~/.config/tree-sitter/config.json
> tree-sitter init-config
  • Add the directory where you’d like to place the repo to the parser-directories in that config file.
  • cd into said path
  • Clone and cd into the tree-sitter-rescript repo (currently my fork has the needed files).
> git clone https://github.com/cwstra/tree-sitter-rescript
> cd tree-sitter-rescript
  • Compile the parser file.
> tree-sitter build
  • Profit!
> tree-sitter dump-languages
(Should output promising information)
> tree-sitter parse test/highlight/functions.res
(Should output an ast)

Viewing all articles
Browse latest Browse all 2592

Trending Articles