Skip to content

Commit 9a1bd6c

Browse files
committed
format
1 parent 218d9a4 commit 9a1bd6c

File tree

5 files changed

+15
-21
lines changed

5 files changed

+15
-21
lines changed

markdown-pages/blog/release-10-1.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ ReScript 10.1 now ships with JSX v4. Here's what's new:
8282
- **Two new transformation modes**. JSX v4 comes with a `classic` mode (= `React.createElement`) and `automatic` mode (= `jsx-runtime` calls). The latter is the new default, moving forward with `rescript/react@0.11` and `React@18`.
8383
- **Allow mixing JSX configurations on the project and module level.** Gradually mix and match JSX transformations and modes without migrating any old code!
8484
- **Pass `prop` types** to `@react.component`. You can now fine tune `@react.component` with your specific prop type needs. Very useful for libraries and frameworks to define component interfaces.
85-
Less boilerplate when using `React.Context`.
85+
Less boilerplate when using `React.Context`.
8686
- **Revisited props spread operator.** This will allow users to spread records in JSX without sacrificing their sanity. Note that this implementation has harder constraints than its JS counterpart. (requires `rescript/react@0.11` or higher)
8787
- **Better type inference of props.** Type inference when passing e.g. variants that are defined in the same module as the component is much improved. With the earlier JSX version, you'd often need to write code like this in order for the compiler to understand which variant you're passing: `<Button variant=Button.Primary text="Click" />`. With JSX v4, you won't need to tell the compiler where the variant you're passing is located: `<Button variant=Primary text="Click" />`.
8888

markdown-pages/docs/manual/overview.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,10 @@ order: 1
148148

149149
### If-else
150150

151-
| JavaScript | ReScript |
152-
| --------------------- | ------------------------------------------------------------------------------ |
153-
| `if (a) {b} else {c}` | `if a {b} else {c}` \* |
154-
| `a ? b : c` | Same |
151+
| JavaScript | ReScript |
152+
| --------------------- | ---------------------------------------------------------------------------------- |
153+
| `if (a) {b} else {c}` | `if a {b} else {c}` \* |
154+
| `a ? b : c` | Same |
155155
| `switch` | `switch` but [super-powered pattern matching!](pattern-matching-destructuring.mdx) |
156156

157157
\* Our conditionals are always expressions! You can write `let result = if a {"hello"} else {"bye"}`

markdown-pages/docs/react/installation.mdx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ Then add the following setting to your existing `rescript.json`:
2828
}
2929
```
3030

31-
32-
3331
To test your setup, create a new `.res` file in your source directory and add the following code:
3432

3533
```res

scripts/test-hrefs.mjs

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,19 @@
1-
import remarkValidateLinks from 'remark-validate-links'
2-
import { remark } from 'remark'
3-
import { read } from 'to-vfile'
4-
import { reporter } from 'vfile-reporter'
5-
import * as fs from 'fs/promises'
1+
import remarkValidateLinks from "remark-validate-links";
2+
import { remark } from "remark";
3+
import { read } from "to-vfile";
4+
import { reporter } from "vfile-reporter";
5+
import * as fs from "fs/promises";
66

7-
const files = new Set(...[(await fs.readdir('markdown-pages', { recursive: true }))])
7+
const files = new Set(
8+
...[await fs.readdir("markdown-pages", { recursive: true })],
9+
);
810

911
for (const file of files) {
10-
1112
if (file.includes(".mdx")) {
12-
1313
let result = await remark()
1414
.use(remarkValidateLinks)
15-
.process(await read('markdown-pages/' + file))
15+
.process(await read("markdown-pages/" + file));
1616

17-
console.log(reporter(result, { quiet: true }))
17+
console.log(reporter(result, { quiet: true }));
1818
}
1919
}
20-
21-
22-

styles/main.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,6 @@
299299
}
300300
}
301301

302-
303302
.wrapper {
304303
position: relative;
305304
display: inline-block;

0 commit comments

Comments
 (0)