Skip to content

Commit

Permalink
docusaurus 3 upgrade (#518)
Browse files Browse the repository at this point in the history
* development path

* remove redundant versions

* supported versions

* fix lint
  • Loading branch information
joshuafernandes authored Dec 4, 2023
1 parent 1c9ea06 commit 5b61e2d
Show file tree
Hide file tree
Showing 179 changed files with 13,636 additions and 32,326 deletions.
91 changes: 10 additions & 81 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,88 +1,17 @@
module.exports = {
env: {
browser: true,
es2021: true,
},
extends: [
"plugin:react/recommended",
"airbnb-typescript",
"plugin:import/typescript",
// @NOTE: Make sure this is always the last element in the array.
"plugin:prettier/recommended",
],
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaVersion: 2020,
sourceType: "module",
ecmaFeatures: {
jsx: true,
},
project: ["./tsconfig.json"],
},
plugins: [
"react",
"react-hooks",
"jsx-a11y",
"import",
"prettier",
"@typescript-eslint",
"plugin:@docusaurus/recommended",
],
settings: {
react: {
pragma: "React", // Pragma to use, default to "React"
fragment: "Fragment", // Fragment to use (may be a property of <pragma>), default to "Fragment"
version: "detect", // React version. "detect" automatically picks the version you have installed.
// You can also use `16.0`, `16.3`, etc, if you want to override the detected value.
// default to latest and warns if missing
// It will default to "detect" in the future
},
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"],
},
"import/resolver": {
typescript: {},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
},
project: ["./tsconfig.json"]
},
rules: {
"import/prefer-default-export": 0,
"react/prop-types": 0,
"import/no-unresolved": [
"error",
{ ignore: ["^@theme", "^@docusaurus", "^@site"] },
],
"no-nested-ternary": 0,
"no-console": 0,
"no-unused-vars": 0,
"no-use-before-define": 0,
"arrow-body-style": 0,
"jsx-a11y/anchor-is-valid": 0,
"jsx-a11y/no-static-element-interactions": 0,
"jsx-a11y/click-events-have-key-events": 0,
"@typescript-eslint/no-unused-expressions": 0,
"@typescript-eslint/no-unused-vars": ["warn", { args: "none" }],
"@typescript-eslint/no-use-before-define": "warn",
"react/require-default-props": 0,
"react/jsx-props-no-spreading": 0,
"react/button-has-type": 0,
"jsx-a11y/label-has-associated-control": [
"error",
{
labelComponents: [],
labelAttributes: [],
controlComponents: [],
assert: "either",
depth: 2,
},
],
"@typescript-eslint/naming-convention": [
"error",
{
selector: "variableLike",
leadingUnderscore: "forbid",
trailingUnderscore: "forbid",
format: ["camelCase", "PascalCase", "UPPER_CASE"],
},
],
"import/extensions": 0,
'@docusaurus/no-untranslated-text': 0
},
};
};
11 changes: 0 additions & 11 deletions .prettierrc

This file was deleted.

24 changes: 8 additions & 16 deletions .stylelintrc.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,10 @@
module.exports = {
extends: ["stylelint-config-standard", "stylelint-config-prettier"],
rules: {
"selector-pseudo-class-no-unknown": [
true,
{
// :global is a CSS modules feature to escape from class name hashing
ignorePseudoClasses: ["global"],
},
],
"extends": "stylelint-config-standard",
"rules": {
"selector-class-pattern": null,
"custom-property-empty-line-before": null,
"selector-id-pattern": null,
"declaration-empty-line-before": null,
"comment-empty-line-before": null,
"value-keyword-case": ["lower", { camelCaseSvgKeywords: true }],
},
};
"comment-empty-line-before" : null,
"media-feature-range-notation": null,
"selector-anb-no-unmatchable": null,
"declaration-block-no-duplicate-properties": null
}
}
3 changes: 0 additions & 3 deletions babel.config.js

This file was deleted.

36 changes: 21 additions & 15 deletions docs/get-started/connect/testnet.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ description: Connect Teku to a testnet.
sidebar_position: 1
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# Connect to a testnet

Run Teku as a consensus client with any execution client on a testnet (for example [Goerli](https://github.com/eth-clients/goerli) or
Expand Down Expand Up @@ -85,9 +88,8 @@ Open a new terminal window.

To run Teku as a beacon node only (without validator duties), run the following command or [specify the options in a configuration file](../../how-to/configure/use-config-file.md):

<!--tabs-->

# Goerli
<Tabs>
<TabItem value="Goerli" label="Goerli" default>

```bash
teku \
Expand All @@ -99,7 +101,8 @@ teku \
--checkpoint-sync-url=<checkpoint sync URL>
```

# Sepolia
</TabItem>
<TabItem value="Sepolia" label="Sepolia" >

```bash
teku \
Expand All @@ -111,7 +114,8 @@ teku \
--checkpoint-sync-url=<checkpoint sync URL>
```

<!--/tabs-->
</TabItem>
</Tabs>

Specify:

Expand All @@ -135,9 +139,8 @@ You can also use [Prometheus and Grafana](../../how-to/monitor/use-metrics.md) t
To run the Teku beacon node and validator client in a single process, run the following command or
[specify the options in the configuration file](../../how-to/configure/use-config-file.md):

<!--tabs-->

# Goerli
<Tabs>
<TabItem value="Goerli" label="Goerli" default>

```bash
teku \
Expand All @@ -151,11 +154,13 @@ teku \
--validator-keys=<path to key file>:<path to password file>[,<path to key file>:<path to password file>,...]
```

# Sepolia
</TabItem>
<TabItem value="Sepolia" label="Sepolia" >

Sepolia is a permissioned network and you can't run a validator client on it without [requesting to become a validator](https://notes.ethereum.org/zvkfSmYnT0-uxwwEegbCqg) first.

<!--/tabs-->
</TabItem>
</Tabs>

Specify:

Expand All @@ -173,9 +178,8 @@ To run the Teku beacon node and validator client as separate processes, first [s

On a separate machine, run Teku using the [`validator-client`](../../reference/cli/subcommands/validator-client.md) subcommand:

<!--tabs-->

# Goerli
<Tabs>
<TabItem value="Goerli" label="Goerli" default>

```bash
teku validator-client \
Expand All @@ -184,11 +188,13 @@ teku validator-client \
--validator-keys=<path to key file>:<path to password file>[,<path to key file>:<path to password file>,...]
```

# Sepolia
</TabItem>
<TabItem value="Sepolia" label="Sepolia" >

Sepolia is a permissioned network and you can't run a validator client on it without [requesting to become a validator](https://notes.ethereum.org/zvkfSmYnT0-uxwwEegbCqg) first.

<!--/tabs-->
</TabItem>
</Tabs>

Specify:

Expand Down
14 changes: 9 additions & 5 deletions docs/get-started/install/install-binaries.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ description: Install Teku from binary distribution.
sidebar_position: 1
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# Install binary distribution

## Linux / Unix / macOS / Windows
Expand All @@ -30,21 +33,22 @@ Unpack the downloaded files and change into the `teku-<release>` directory.

Display Teku command line help to confirm installation:

<!--tabs-->

# Linux/macOS
<Tabs>
<TabItem value="Linux/macOS" label="Linux/macOS" default>

```bash
./bin/teku --help
```

# Windows
</TabItem>
<TabItem value="Windows" label="Windows" >

```bat
bin\teku --help
```

<!--/tabs-->
</TabItem>
</Tabs>

## macOS with Homebrew

Expand Down
14 changes: 9 additions & 5 deletions docs/get-started/install/run-docker-image.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ description: Run Teku using the official Docker image.
sidebar_position: 3
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# Run Teku from a Docker image

Use the Teku Docker image to run a node without installing Teku.
Expand Down Expand Up @@ -79,9 +82,8 @@ The example assumes the validators specified in [`--validator-keys`](../../refer

Run `docker-compose up` in the directory containing the `docker-compose.yml` file to start the container.

<!--tabs-->

# Goerli
<Tabs>
<TabItem value="Goerli" label="Goerli" default>

```yaml
---
Expand Down Expand Up @@ -138,7 +140,8 @@ services:
- "5051:5051"
```
# Mainnet
</TabItem>
<TabItem value="Mainnet" label="Mainnet" >
```yaml
---
Expand Down Expand Up @@ -192,7 +195,8 @@ services:
- "5051:5051"
```
<!--/tabs-->
</TabItem>
</Tabs>
<!-- Links -->
Expand Down
Loading

1 comment on commit 5b61e2d

@vercel
Copy link

@vercel vercel bot commented on 5b61e2d Dec 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.