Skip to content

Commit ecbdb5c

Browse files
committed
chore: fix eslint rules
1 parent 2e5f6d1 commit ecbdb5c

12 files changed

+220
-257
lines changed

.eslintignore

+3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
# directories
22
.docusaurus
3+
build
34
node_modules
45
repos
6+
static
57

68
# files
79
babel.config.js
810
docusaurus.config.ts
11+
sidebars.js

.eslintrc.yml

+11-9
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,29 @@ env:
33
extends:
44
- "eslint:recommended"
55
- "plugin:@docusaurus/recommended"
6-
- "plugin:@typescript-eslint/recommended"
7-
- "plugin:mdx/recommended"
8-
- "plugin:react/recommended"
96
overrides:
107
- files:
118
- "*.md"
129
- "*.mdx"
10+
extends:
11+
- "plugin:mdx/recommended"
12+
- "plugin:react/recommended"
1313
parser: "eslint-mdx"
1414
rules:
1515
no-unused-expressions: "off"
1616
- files:
1717
- "*.ts"
1818
- "*.tsx"
19+
extends:
20+
- "plugin:@typescript-eslint/recommended"
21+
- "plugin:react/recommended"
1922
parser: "@typescript-eslint/parser"
2023
parserOptions:
24+
ecmaFeatures:
25+
jsx: true
26+
ecmaVersion: "latest"
2127
project: "tsconfig.json"
28+
sourceType: "module"
2229
plugins:
2330
- "@typescript-eslint"
2431
rules:
@@ -30,13 +37,8 @@ overrides:
3037
- error
3138
- argsIgnorePattern: ^_
3239
varsIgnorePattern: ^_
33-
parserOptions:
34-
ecmaFeatures:
35-
jsx: true
36-
ecmaVersion: "latest"
40+
"react/react-in-jsx-scope": "off"
3741
root: true
38-
rules:
39-
"react/react-in-jsx-scope": "off"
4042
settings:
4143
react:
4244
version: "detect"

.lintstagedrc.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
"*.{json,md,mdx,ts,tsx,yml}": "bun run fix"
1+
"*.{md,mdx,ts,tsx}": "bun run lint:fix"
2+
"*.{json,md,mdx,ts,tsx,yml}": "bun run prettier:write"

bun.lock

+92-42
Large diffs are not rendered by default.

docs/guides/airdrops/examples/02-create-campaign.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ Now that we have the `baseParams` ready, it's time to setup rest of the input pa
169169
### Aggregate Amount
170170

171171
This is the total amount of tokens you want to airdrop to your users, denoted in units of the asset's decimals. Let say
172-
you want to airdrop 100M tokens of DAI. Then, the aggregate amount would be $100M*10^{18}$.
172+
you want to airdrop 100M tokens of DAI. Then, the aggregate amount would be $100Mm*10^{18}$.
173173

174174
```solidity
175175
uint256 aggregateAmount = 100000000e18;

docs/guides/flow/04-gas-benchmarks.md

-33
This file was deleted.
+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
id: "gas-benchmarks"
3+
sidebar_position: 4
4+
title: "Gas Benchmarks"
5+
---
6+
7+
import RemoteGFMContent from "@site/src/components/atoms/RemoteGFMContent";
8+
9+
The gas usage of the Flow protocol is not deterministic and varies by user. Calls to third-party contracts, such as
10+
ERC-20 tokens, may use an arbitrary amount of gas. The values in the table below are rough estimations on Ethereum
11+
mainnet - you shouldn't take them for granted. The gas usage may vary depending on the network.
12+
13+
:::note
14+
15+
The benchmarks were generated using the code in this [GitHub repository](https://github.com/sablier-labs/benchmarks).
16+
17+
:::
18+
19+
## SablierFlow
20+
21+
<RemoteGFMContent url="https://raw.githubusercontent.com/sablier-labs/benchmarks/cf6ab25/results/flow/flow.md" />

docs/guides/lockup/04-gas-benchmarks.md

-141
This file was deleted.
+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
id: "gas-benchmarks"
3+
sidebar_position: 4
4+
title: "Gas Benchmarks"
5+
---
6+
7+
import RemoteGFMContent from "@site/src/components/atoms/RemoteGFMContent";
8+
9+
The gas usage of the Lockup protocol is not deterministic and varies by user. Calls to third-party contracts, such as
10+
ERC-20 tokens, may use an arbitrary amount of gas. The values in the table below are rough estimations on Ethereum
11+
mainnet - you shouldn't take them for granted. The gas usage may vary depending on the network.
12+
13+
:::note
14+
15+
The benchmarks were generated using the code in this [GitHub repository](https://github.com/sablier-labs/benchmarks).
16+
17+
:::
18+
19+
## BatchLockup
20+
21+
<RemoteGFMContent url="https://raw.githubusercontent.com/sablier-labs/benchmarks/cf6ab25/results/lockup/batch-lockup.md" />
22+
23+
## LockupLinear streams
24+
25+
<RemoteGFMContent url="https://raw.githubusercontent.com/sablier-labs/benchmarks/cf6ab25/results/lockup/lockup-linear.md" />
26+
27+
## LockupDynamic streams
28+
29+
<RemoteGFMContent url="https://raw.githubusercontent.com/sablier-labs/benchmarks/cf6ab25/results/lockup/lockup-dynamic.md" />
30+
31+
## LockupTranched streams
32+
33+
<RemoteGFMContent url="https://raw.githubusercontent.com/sablier-labs/benchmarks/cf6ab25/results/lockup/lockup-tranched.md" />

formatter.js

-29
This file was deleted.

package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@
3535
"@mdx-js/react": "~3.1.0",
3636
"@sablier/deployments": "1.0.0-alpha.8",
3737
"@vercel/analytics": "^1.5.0",
38+
"axios": "^1.8.4",
3839
"clsx": "^2.1.1",
40+
"docusaurus-plugin-remote-content": "^4.0.0",
3941
"docusaurus-theme-github-codeblock": "^2.0.2",
4042
"function-plot": "^1.25.1",
4143
"hast-util-is-element": "3.0.0",
@@ -98,7 +100,7 @@
98100
"deploy": "docusaurus deploy",
99101
"fix": "bun run prettier:write && bun run lint:fix",
100102
"lint:check": "bun eslint --cache . --ext md,mdx,ts,tsx",
101-
"lint:fix": "bun eslint --cache . --ext md,mdx,ts,tsx --fix && bun formatter.js",
103+
"lint:fix": "bun eslint --cache --fix . --ext md,mdx,ts,tsx",
102104
"prepare": "husky",
103105
"prettier:check": "prettier --cache --check \"**/*.{json,md,mdx,ts,tsx,yml}\"",
104106
"prettier:write": "prettier --cache --write \"**/*.{json,md,mdx,ts,tsx,yml}\"",

0 commit comments

Comments
 (0)