Extending JsxDOM.domProps
That merely means you should use the ones that come with the compiler directly: JsxDOM.domProps. The PR needs to be done in the compiler repo: rescript/runtime/JsxDOM.res at master ·...
View ArticleUsing turbo (turborepo) with ReScript and caching node_modules/**/*
Yes, we don’t use it (some hacks on our side that aren’t well supported and don’t have time to address for now), but I think it will also build dependencies (like webapi …) inside node_modules, so if...
View ArticleI'm looking into using ast-grep fo linting ReScript. What rules should I...
I’ve used a tool called ast-grep to write some custom lint rules and code transformations for TypeScript. ast-grep.github.io ast-grep | structural search/rewrite tool for many languages ast-grep is a...
View ArticleI'm looking into using ast-grep fo linting ReScript. What rules should I...
rules of hooks would be nice
View Article[ANN] rescript-rest - RPC-like client, contract, and server implementation...
Added helper for Temporary Redirect GitHub GitHub - DZakh/rescript-rest: 😴 ReScript RPC-like client, contract, and... 😴 ReScript RPC-like client, contract, and server implementation for a pure REST...
View ArticleUsing turbo (turborepo) with ReScript and caching node_modules/**/*
We use pnpm + turborepo + rewatch in a repo with apps/ and packages/ directories. Rewatch build gets ran at the root as part of "prepare" and we exclude *.res files from our inputs: "build": {...
View ArticleMaking test assertions on variant types
Does anyone have a preferred way to making assertions on a variant type? For example something like this: type httpResponse<'a> = | Success('a) | Conflict(string) | NotFound(string) |...
View ArticleMaking test assertions on variant types
toBe checks the reference equality, why don’t you use toEqual or toStrictEqual instead?
View ArticleMaking test assertions on variant types
I use GitHub - DZakh/rescript-ava: 🪲 ReScript bindings for Ava. Any other test library will work
View ArticleMaking test assertions on variant types
I can feel your pain. I need something like Rust’s matches! macro to assert with a pattern.
View ArticleMaking test assertions on variant types
An equivalent PPX macro may be required, but it’s not that complicated if it generates a framework-specific codes.
View ArticleI'm looking into using ast-grep fo linting ReScript. What rules should I...
I came across this: GitHub - plow-technologies/rescript-linter: Lint your ReScript code! I might try using that as a base instead of ast-grep
View ArticleMaking test assertions on variant types
Oh yeah, toEqual works when you’re asserting a specific value expect(res)->toEqual(Success(5)) I think I chose a poor example, but I meant asserting that the res is of type success, without caring...
View ArticlePrivate by default
So I did some digging to transform the JavaScript code to remove the export. It is possible to transform the code, remove the export of the JavaScript side. However, the approach didn’t work for the...
View ArticleMaking test assertions on variant types
I was browsing the forums and saw another discussion on where someone with a similar issue created an “enum” function let enum = ms => switch ms { | Part1(_) => #Part1 | Cancelled =>...
View ArticleI'm looking into using ast-grep fo linting ReScript. What rules should I...
@cristianoc i’m not super familiar with setting up tree-sitter and it looks like you worked on the repo for Rescript. How do I get things set up so I can run tree-sitter parse src/foo.res?
View ArticleI'm looking into using ast-grep fo linting ReScript. What rules should I...
It’s more the work of @nkrkv @aspeddro and @Emilios1995 (not sure if he has a forum account).
View ArticleI'm looking into using ast-grep fo linting ReScript. What rules should I...
On my Linux machine, I got the rescript parser running through the CLI by: putting the json file below (with my actual username in the paths) at ~/.config/tree-sitter/config.json cloning the...
View ArticleI'm looking into using ast-grep fo linting ReScript. What rules should I...
I’m getting No language found after following those steps and trying to run tree-sitter parse src/foo.res.
View ArticleI'm looking into using ast-grep fo linting ReScript. What rules should I...
Ah, missed a step. Had to run tree-sitter build in the tree-sitter-rescript repo.
View Article