Skip to content

Commit

Permalink
docusaurus3 upgrade (#232)
Browse files Browse the repository at this point in the history
* docusaurus3 upgrade
  • Loading branch information
joshuafernandes authored Nov 29, 2023
1 parent 8d4d58a commit d800fd5
Show file tree
Hide file tree
Showing 24 changed files with 8,802 additions and 9,267 deletions.
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,8 @@ trim_trailing_whitespace = true

[*.md]
insert_final_newline = false
trim_trailing_whitespace = false

[*.mdx]
insert_final_newline = false
trim_trailing_whitespace = false
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
},
};
};
21 changes: 21 additions & 0 deletions .github/workflows/links.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: Check for broken links

on:
pull_request:
branches:
- main

jobs:
linkCheck:
name: Link Checking
runs-on: ubuntu-latest
strategy:
matrix:
file-extensions: [".md", ".mdx"]
steps:
- uses: actions/checkout@v3
- name: LinkCheck
uses: ConsenSys/docs-gha/linkcheck@main
with:
FILE_EXTENSION: ${{ matrix.file-extensions }}
12 changes: 0 additions & 12 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,3 @@ jobs:
uses: ConsenSys/docs-gha/lint@main
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
linkCheck:
name: Link Checking
runs-on: ubuntu-latest
strategy:
matrix:
file-extensions: [".md", ".mdx"]
steps:
- uses: actions/checkout@v3
- name: LinkCheck
uses: ConsenSys/docs-gha/linkcheck@main
with:
FILE_EXTENSION: ${{ matrix.file-extensions }}
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.

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

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

# Install binary distribution

## Prerequisites
Expand All @@ -24,18 +27,19 @@ Unpack the downloaded files and change into the `web3signer-<release>` directory

Display Web3Signer command line help to confirm installation:

<!--tabs-->

# Linux or MacOS
<Tabs>
<TabItem value="Linux or MacOS" label="Linux or MacOS" default>

```bash
bin/web3signer --help
```

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

```bat
bin\web3signer --help
```

<!--/tabs-->
</TabItem>
</Tabs>
32 changes: 19 additions & 13 deletions docs/get-started/start-web3signer.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ description: Start Web3Signer.
sidebar_position: 4
---

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

# Start Web3Signer

:::note
Expand All @@ -19,27 +22,29 @@ The execution layer is formerly "Ethereum 1.0." The consensus layer is formerly
Web3Signer supports consensus layer clients, execution layer clients, and Filecoin platforms, so you
must specify the signing mode, and the location of the signing key configuration files when starting Web3Signer.

<!--tabs-->

# Consensus layer client
<Tabs>
<TabItem value="Consensus layer client" label="Consensus layer client" default>

```bash
web3signer --key-store-path=/Users/me/keyFiles/ eth2 --slashing-protection-db-url="jdbc:postgresql://localhost/web3signer" --slashing-protection-db-username=postgres --slashing-protection-db-password=password
```

# Execution layer client
</TabItem>
<TabItem value="Execution layer client" label="Execution layer client" >

```bash
web3signer --key-store-path=/Users/me/keyFiles/ eth1
```

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

```bash
web3signer --key-store-path=/Users/me/keyFiles/ filecoin
```

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

In the command line:

Expand Down Expand Up @@ -89,24 +94,25 @@ about this option and the supported networks.
Use the [`upcheck`](https://consensys.github.io/web3signer/web3signer-eth2.html#tag/Server-Status)
endpoint to confirm Web3Signer is connected and running.

<!--tabs-->

# curl request
<Tabs>
<TabItem value="curl request" label="curl request" default>

```bash
curl -X GET http://localhost:9000/upcheck
```

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

```json
200 OK
```

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

Web3Signer by default also performs a health check on the [slashing protection
database](../how-to/configure-slashing-protection.md).
Web3Signer by default also performs a health check on the
[slashing protection database](../how-to/configure-slashing-protection.md)

<!-- Links -->

Expand Down
15 changes: 9 additions & 6 deletions docs/how-to/configure-slashing-protection.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ description: Configure consensus layer slashing protection.
sidebar_position: 6
---

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

# Configure consensus layer slashing protection

Configure [slashing protection] to prevent consensus layer validators from being penalized for
Expand Down Expand Up @@ -66,21 +69,21 @@ For example `V1_initial.sql`, `V2__removeUniqueConstraints.sql`, then `V3__addLo
Use the [Flyway] migration tool to automatically load them in order.
:::

<!--tabs-->
<Tabs>

# Flyway DB migration tool
<TabItem value="Flyway DB migration tool" label="Flyway DB migration tool" default>

```bash
flyway migrate -url="jdbc:postgresql://localhost/web3signer" -locations="filesystem:/Users/me/web3signer-0.2.1-SNAPSHOT/migrations/postgresql"
```

# Postgres command line
</TabItem>
<TabItem value="Postgres command line" label="Postgres command line" >

```bash
psql --echo-all --host=localhost --port=5432 --dbname=web3signer --username=postgres -f /Users/me/web3signer-0.2.1-SNAPSHOT/migrations/postgresql/postgresql/V1__initial.sql
```

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

:::note
If using the PostgreSQL command line inside a docker container, ensure you mount the
Expand Down
3 changes: 1 addition & 2 deletions docs/how-to/store-keys-vaults/aws.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@ final CreateSecretRequest secretRequest =
secretsManagerClient.createSecret(secretRequest);
```

Specify the following when [configuring the signing key configuration
file](../use-signing-keys.md#use-key-configuration-files):
Specify the following when [configuring the signing key configuration file](../use-signing-keys.md#use-key-configuration-files):

- Authentication mode.
Valid options are `ENVIRONMENT` and `SPECIFIED`.
Expand Down
Loading

1 comment on commit d800fd5

@vercel
Copy link

@vercel vercel bot commented on d800fd5 Nov 29, 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.