Skip to content

Commit 183d9de

Browse files
committed
Add prettier and format everything
1 parent 95f7996 commit 183d9de

File tree

648 files changed

+16045
-12374
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

648 files changed

+16045
-12374
lines changed
Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
---
22
name: 🚨 Documentation issue
33
about: Create an issue to help us improve the rescript-lang.org documentation website
4-
title: ''
5-
labels: ''
6-
assignees: ''
7-
4+
title: ""
5+
labels: ""
6+
assignees: ""
87
---
9-

.prettierrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
semi: false
2+
plugins:
3+
- "@prettier/plugin-oxc"

CHANGELOG.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# Changelog
22

3-
43
This changelog documents significant changes that caused a new version in the manual, or other related resources.
54

65
We don't create a version fork for every minor release, and try to make docs "append only" as much as possible. Usually when we introduce a new feature we add a `since 9.0` annotation to a specific section, and be done with it.
@@ -13,8 +12,7 @@ Here are the notes on major changes we did, and how the version corresponds to s
1312

1413
### latest
1514

16-
- 9.1 related
17-
-
15+
- ## 9.1 related
1816

1917
### v9.0 (v8.3 - v9.0)
2018

@@ -34,5 +32,3 @@ Here are the notes on major changes we did, and how the version corresponds to s
3432
### v8.0.0 (v6 - v8.3)
3533

3634
- Docs with Reason / OCaml syntax before the new syntax
37-
38-

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# rescript-lang.org
2+
23
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v1.4%20adopted-ff69b4.svg)](CODE_OF_CONDUCT.md)
34

45
This is the official documentation platform for the [ReScript](https://rescript-lang.org) programming language.

_blogposts/2020-08-10-bucklescript-is-rebranding.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,15 @@ We're pleased to announce that BuckleScript is getting a brand new name: **ReScr
2121
## Community Situation
2222

2323
BuckleScript started with the idea that **JavaScript programmers deserved a great typed language with a fast and lean toolchain**. This idea took root and, over the years, we've gradually accomplished feats such as:
24+
2425
- a state of the art compiled JavaScript output that rivals hand-written JS,
2526
- a fast & reliable toolchain much needed in front-end and Node development,
2627
- various JS interop features that spawned an ecosystem of well typed libraries,
2728
- a production-ready standard library,
2829
- [and recently](/blog/bucklescript-8-1-new-syntax), a fresh syntax made by a major contributor of Reason's old syntax.
2930

3031
These developments have attracted many people into our community. But one bigger challenge persisted: newcomers dropped out at the sheer amount of extra incongruent tools and learning overhead from having to understand OCaml concepts, Reason concepts, and BuckleScript's concepts. Take, for example, what's required to make a React app using BuckleScript:
32+
3133
- Knowledge of React.
3234
- Knowledge of JS.
3335
- Knowledge of BuckleScript's specific bindings to React (that we've tried hard to keep to a minimum).
@@ -43,6 +45,7 @@ The adoption barrier is real, and it's about time we finally solve it.
4345
## The Rebranding
4446

4547
Today, we'll start to truly unify the various BuckleScript-related projects under the ReScript umbrella. This includes:
48+
4649
- The compiler, build system and the new syntax unified under a single installation.
4750
- Doubling down on editor tooling for ReScript usage.
4851
- A single documentation site (this one), which unifies all the docs and greatly trims down on redundant and stale info.

_blogposts/2020-08-28-new-rescript-logo.mdx

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,43 +7,52 @@ description: |
77
Today, our resident designer Bettina is unveiling to us the fresh new ReScript branding we've been long waiting for. We hope you're as excited about the result as us!
88
---
99

10-
import Image from "src/components/Image";
10+
import Image from "src/components/Image"
1111

1212
## Why the Rebranding?
1313

1414
ReScript is the evolution and fusion of Reason and BuckleScript. As we're a design-minded community, we'd like to convey this new identity not only through new technical changes as we've done so far, but also through a proper, more professionally crafted logo, color scheme and font. At the same time, we'd like to do so while recalling our roots.
1515

1616
Here it is!
1717

18-
19-
<Image withShadow={false} src="/static/blog/rescript-launch/ReScript-1.jpg" caption="Comparison between the Reason, BuckleScript and ReScript logos"/>
20-
18+
<Image
19+
withShadow={false}
20+
src="/static/blog/rescript-launch/ReScript-1.jpg"
21+
caption="Comparison between the Reason, BuckleScript and ReScript logos"
22+
/>
2123

2224
The old Reason and BuckleScript logo had many limitations:
25+
2326
- The icons didn't really work well on round Social Media profile images (or round shapes at all).
2427
- There's no guideline on how the logo works inverted, or on colored background.
2528
- The large red rectangle makes it difficult to balance the logo with other elements.
2629
- The buckle and belt were a bit too literal and did not convey much.
2730

2831
The new logo addresses all these and more:
2932

30-
<Image withShadow={false} src="/static/blog/rescript-launch/ReScript-2.jpg" caption="Logo comparison on social media"/>
33+
<Image
34+
withShadow={false}
35+
src="/static/blog/rescript-launch/ReScript-2.jpg"
36+
caption="Logo comparison on social media"
37+
/>
3138

3239
## Creating Meaning Through Simple Shapes
3340

3441
A minimal logo design is achieved by putting aside all distractions while focusing on legibility, meaning and small details like clear lines, interesting perspective and depth.
3542

36-
37-
<Image withShadow={false} src="/static/blog/rescript-launch/ReScript-4.jpg" caption="ReScript logo variations and usage examples"/>
38-
43+
<Image
44+
withShadow={false}
45+
src="/static/blog/rescript-launch/ReScript-4.jpg"
46+
caption="ReScript logo variations and usage examples"
47+
/>
3948

4049
**The letter "r"**, composed of two shapes, is inspired by Albers, a german-born American Bauhaus artist and typographer. An object should be simple, beautiful, functional and accessible for everyone - a statement which applies to ReScript's principles perfectly.
4150

4251
**I/O**: The rectangle and circle represent the input / output, recalling the digital nature of a program.
4352

4453
**The red app-shaped background** references the vibrant, playful applications our developers are empowered to create with ReScript.
4554

46-
**The Logotype** ("rescript") complements the brand mark with its clean look and its embrace of technology while retaining a functional look.
55+
**The Logotype** ("rescript") complements the brand mark with its clean look and its embrace of technology while retaining a functional look.
4756

4857
We'd like to position ReScript to be a community of product-first developers who care about the fit & finish of their work, while keeping an eye on the quality of their engineering. This interplay of design and engineering is a hard-to-achieve but beautifully worthwhile sweet spot that's frequently been missing in the programmer community; our vibrant logo is our renewed symbolic step toward this mission. Come along with us on our journey!
4958

_blogposts/2020-09-25-release-8-3-2.mdx

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ To get the build output, instead of communicating through IPC, we adopted a simp
7474
This makes the editor integration build-system agnostic, it does not need talk to the build system directly.
7575

7676
It also makes our build tool work with other watchers including Facebook's [watchman](https://facebook.github.io/watchman/).
77-
Watchman is a more scalable watcher tool for some specific platforms and less memory hungry, however, we still need a watchman-client to get the output of triggered job.
77+
Watchman is a more scalable watcher tool for some specific platforms and less memory hungry, however, we still need a watchman-client to get the output of triggered job.
7878
We write the output to `.compiler.log` per each build, allowing clients to read compiler diagnostics when they want.
7979

8080
## A better algorithm for removing stale outputs
@@ -90,8 +90,8 @@ We scan `lib/bs` directory and check some dangling `cm{i,t,j,ti}` files, if it d
9090
the current build set, it is considered stale artifacts. If it is `cmt` file, it would trigger some hooks of `genType`, notably -cmt-rm.
9191

9292
- Based on previous build logs
93-
We store previous compilation stats. If a file is in the previous compiler output, but no longer in the output of the new build, it is considered stale and can be removed.
94-
it is considered stale output which can be removed.
93+
We store previous compilation stats. If a file is in the previous compiler output, but no longer in the output of the new build, it is considered stale and can be removed.
94+
it is considered stale output which can be removed.
9595

9696
In general, strategy two is more reliable and efficient.
9797

@@ -100,11 +100,9 @@ In general, strategy two is more reliable and efficient.
100100

101101
However, strategy one is easier for tooling like `genType`. Not every tool has knowledge of the build system.
102102

103-
104103
Sometimes a combination of both strategies is needed.
105-
- When removing .cm* files, we use the first strategy.
106-
- When removing generated javascript, we use strategy two,
107-
108104

105+
- When removing .cm\* files, we use the first strategy.
106+
- When removing generated javascript, we use strategy two,
109107

110108
Happy Hacking!

_blogposts/2020-09-25-release-8-3.mdx

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,28 +17,27 @@ It's focused on type safety, performance and JS interop. It used to be called Bu
1717
1818
```
1919

20-
The changes are listed [here](https://github.com/rescript-lang/rescript/blob/master/Changes.md#83), this is a large release, and we will go through some highlighted changes.
21-
22-
20+
The changes are listed [here](https://github.com/rescript-lang/rescript/blob/master/Changes.md#83), this is a large release, and we will go through some highlighted changes.
2321

2422
## Lightweight FFI attributes without `bs.` prefix
2523

2624
In this release, we make the `bs.` prefix optional, this will make the FFI less verbose.
2725

2826
For example, the old externals for `readFileAsUtf8Sync` used to be written like this
2927

30-
3128
<CodeTab labels={["ReScript", "Reason (Old Syntax)", "ML Syntax"]}>
3229

3330
```res
3431
@bs.val @bs.module("fs")
3532
external readFileAsUtf8Sync: (string, @bs.as("utf8") _) => string = "readFileSync"
3633
```
34+
3735
```reason
3836
[@bs.val] [@bs.module "fs"]
3937
external readFileAsUtf8Sync: (string, [@bs.as "utf8"] _) => string =
4038
"readFileSync";
4139
```
40+
4241
```ocaml
4342
external readFileAsUtf8Sync : string -> (_[@bs.as "utf8"]) -> string = "readFileSync" [@@bs.val] [@@bs.module "fs"]
4443
```
@@ -52,11 +51,13 @@ It can now be simplified as
5251
```res
5352
@val @module("fs") external readFileAsUtf8Sync: (string, @as("utf8") _) => string = "readFileSync"
5453
```
54+
5555
```reason
5656
[@val] [@module "fs"]
5757
external readFileAsUtf8Sync: (string, [@as "utf8"] _) => string =
5858
"readFileSync";
5959
```
60+
6061
```ocaml
6162
external readFileAsUtf8Sync : string -> (_[@as "utf8"]) -> string = "readFileSync"
6263
[@@val] [@@module "fs"]
@@ -70,8 +71,7 @@ with the exception of the following two that don't have abbreviations:
7071
- `bs.send.pipe` : this attribute was deprecated in favor of `bs.send`; you can still use the existing one for backward compatibility.
7172

7273
- `bs.splice` : this attribute was deprecated in favor of `bs.variadic`; you can still use the existing one for
73-
backward compatibility.
74-
74+
backward compatibility.
7575

7676
## default import in Es6 support
7777

@@ -84,11 +84,13 @@ If you use es6 module output, the default bindings will be compiled properly now
8484
8585
let a = input("hello")
8686
```
87+
8788
```reason
8889
[@module "hello"] external input: string => string = "default";
8990
9091
let a = input("hello");
9192
```
93+
9294
```ocaml
9395
external input : string -> string = "default" [@@module "hello"]
9496
@@ -100,11 +102,10 @@ let a = input "hello"
100102
Will now be compiled properly under es6 format as below:
101103

102104
```js
103-
import Hello from "hello";
104-
var a = Hello("hello");
105+
import Hello from "hello"
106+
var a = Hello("hello")
105107
```
106108

107-
108109
## Customized js file extension support
109110

110111
Now user can pick up their js file extension support per module format:
@@ -126,8 +127,6 @@ To have better integration with other [JS infrastructures](https://github.com/re
126127
for example, Next.js/React Native, we allow file names like `404.res`,
127128
`Button.Android.res` so that it can just be picked up by those tools
128129

129-
130-
131130
## Better type based inference for pattern `let {a,b,c} = value`
132131

133132
Previously, for code like this:
@@ -144,6 +143,7 @@ let f = (u: N.t) => {
144143
x + 1
145144
} /* type error */
146145
```
146+
147147
```reason
148148
module N = {
149149
type t = {x: int};
@@ -154,6 +154,7 @@ let f = (u: N.t) => {
154154
x + 1;
155155
}; /* type error */
156156
```
157+
157158
```ocaml
158159
module N = struct
159160
type t = {

_blogposts/2020-11-17-editor-support-custom-operators-and-more.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ description: |
88
Update on what we're doing around the end of 2020 and early next year.
99
---
1010

11-
import Video from "src/components/Video";
11+
import Video from "src/components/Video"
1212

1313
## Upcoming Improvements
1414

_blogposts/2020-11-26-editor-support-release-1-0.mdx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ description: |
99
Type hints, jump to definition, error diagnostics, and more.
1010
---
1111

12-
1312
## Editor Integration Has Finally Landed
1413

1514
Thank you so much for the wait!
1615

1716
**Here are all the features:**
17+
1818
- Highlighting
1919
- Formatting
2020
- Diagnostics
@@ -32,4 +32,8 @@ We'll keep on iterating on the polish of the plugins, and release better [Sublim
3232

3333
Happy thanksgiving!
3434

35-
<Image withShadow={false} src="/static/blog/editor_support_article.jpg" caption="ReScript now offers autocompletion for VSCode and neovim (Sublime coming soon)"/>
35+
<Image
36+
withShadow={false}
37+
src="/static/blog/editor_support_article.jpg"
38+
caption="ReScript now offers autocompletion for VSCode and neovim (Sublime coming soon)"
39+
/>

0 commit comments

Comments
 (0)