Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuafernandes committed Nov 29, 2023
1 parent e9d3c77 commit 8ac7998
Show file tree
Hide file tree
Showing 14 changed files with 8,649 additions and 13,841 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
},
};
};
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"],
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.

55 changes: 2 additions & 53 deletions docs/configure/openapi.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,57 +6,6 @@ sidebar_label: OpenAPI docs

# Configure OpenAPI docs

This template repository uses the [Redocusaurus](https://redocusaurus.vercel.app/) plugin to include
OpenAPI documentation directly into the doc site.
With this plugin, you can manage OpenAPI docs within Docusaurus without linking to a separate site
and incurring more fragmentation in your doc system.
There are currently no plugins available to support Docusaurus 3. Please refer to the solution implemented on Web3signer

<!-- markdown-link-check-disable-next-line -->
See the [demo OpenAPI docs using Redocusaurus](/api).

## Configure Redocusaurus

The following is an example of how to configure the Redocusaurus plugin in `docusaurus.config.js`:

```js title="docusaurus.config.js"
const redocusaurus = [
"redocusaurus",
{
specs: [
{
id: "using-remote-url",
// Remote File
spec: "https://raw.githubusercontent.com/rohit-gohri/redocusaurus/main/website/openapi/single-file/openapi.yaml",
route: "/api/",
},
],
theme: {
/**
* Highlight color for docs
*/
primaryColor: "#3655d5",
/**
* Options to pass to redoc
* @see https://github.com/redocly/redoc#redoc-options-object
*/
options: { disableSearch: true },
/**
* Options to pass to override RedocThemeObject
* @see https://github.com/Redocly/redoc#redoc-theme-object
*/
theme: {},
},
},
];
```

## Remove Redocusaurus

To remove the Redocusaurus plugin:

1. In your project repository, run `npm uninstall redocusaurus`.

2. Remove the [Redocusaurus configuration](#configure-redocusaurus) from `docusaurus.config.js`.

3. Under the `const config` object in `docusaurus.config.js`, remove the references to Redocusaurus
from the `plugins` and `themes` key.
We will update this space when there is a plugin available from Redocusaurus or Palo Alto OpenAPI
3 changes: 1 addition & 2 deletions docs/configure/spell-check.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ Instead, we recommend using [in-line comments](https://cspell.org/configuration/
to disable spell check – for example, if you have a snippet of code with an example API key
which CSpell picks up.

If you use a new term that causes spell check to fail, you can [add the term to your project's
dictionary](../create/run-in-development.md#npm-run-lintspelling).
If you use a new term that causes spell check to fail, you can [add the term to your project's dictionary](../create/run-in-development.md#npm-run-lintspelling).

If you have a large API page that causes spell check errors, it may make sense to exclude
the entire file or folder.
Expand Down
6 changes: 4 additions & 2 deletions docs/configure/versioning/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
description: Support and manage multiple documentation versions.
sidebar_position: 1
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# Configure and use versioning

Expand Down Expand Up @@ -59,7 +61,7 @@ the `current` version is given a `label` and `path` attribute.

In the following steps, we'll release the `1.0` version of the documentation (`./docs`) as an example.

<!--tabs-->
<Tabs>

# Syntax

Expand All @@ -85,7 +87,7 @@ This command:
- Creates a new `versioned_sidebars/version-1.0-sidebars.json` file.
- Appends the new version number to the `versions.json` file.

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

Your docs now have two versions:

Expand Down
13 changes: 9 additions & 4 deletions docs/contribute/add-images.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ sidebar_position: 5
toc_max_heading_level: 3
---

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

# Add images

You can add [screenshots](#screenshots) and [diagrams](#diagrams) to the ConsenSys documentation.
Expand All @@ -13,9 +16,9 @@ your doc content using [Markdown syntax](https://docusaurus.io/docs/markdown-fea
You can also use HTML to center the image.
For example:

<!--tabs-->
<Tabs>

# Markdown
<TabItem value="markdown" label="markdown">

```markdown
<p align="center">
Expand All @@ -25,15 +28,17 @@ For example:
</p>
```

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

<p align="center">

![Snap transaction insights UI](../assets/transaction-insights.png)

</p>

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

## Screenshots

Expand Down
Loading

0 comments on commit 8ac7998

Please sign in to comment.