Skip to content

Commit

Permalink
cull versions to n-3 and update packages ie docusaurus + linting (#1690)
Browse files Browse the repository at this point in the history
* update docusaurus versions

Signed-off-by: Joshua Fernandes <[email protected]>

* remove Hyperledger from readme (#1689)

Signed-off-by: Sally MacFarlane <[email protected]>

* add in lint plugins

Signed-off-by: Joshua Fernandes <[email protected]>

* dummy commit to kick the build off

Signed-off-by: Joshua Fernandes <[email protected]>

* only keep the last 3 versions of docs

Signed-off-by: Joshua Fernandes <[email protected]>

---------

Signed-off-by: Joshua Fernandes <[email protected]>
Signed-off-by: Sally MacFarlane <[email protected]>
Co-authored-by: Sally MacFarlane <[email protected]>
  • Loading branch information
joshuafernandes and macfarla authored Sep 19, 2024
1 parent e01f578 commit 6e9d2d2
Show file tree
Hide file tree
Showing 2,981 changed files with 1,838 additions and 437,914 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
},
};
};
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and lint
name: Build

on:
workflow_call:
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/links.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Check for link errors

on:
workflow_call:

jobs:
linkCheck:
name: Link Checking
runs-on: ubuntu-latest
strategy:
matrix:
file-extensions: [".md", ".mdx"]
steps:
- uses: actions/checkout@v4
- name: LinkCheck
uses: ConsenSys/docs-gha/linkcheck@main
with:
FILE_EXTENSION: ${{ matrix.file-extensions }}
19 changes: 2 additions & 17 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
name: Check for lint, spelling and link errors
name: Check for lint errors

on:
workflow_call:

jobs:
lint:
name: Lint Code Base, Spelling, Link Check
name: Lint Code Base
runs-on: ubuntu-latest
permissions:
contents: read
Expand All @@ -15,18 +15,3 @@ jobs:

- name: Lint
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@v4
- name: LinkCheck
uses: ConsenSys/docs-gha/linkcheck@main
with:
FILE_EXTENSION: ${{ matrix.file-extensions }}
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
- check-workflows
- build
- lint
- links
outputs:
PASSED: ${{ steps.set-output.outputs.PASSED }}
steps:
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v19.4.0
v20.14.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", "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: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ If you're looking for the software source code, go to the [Besu software reposit

### View older doc versions

See the Besu wiki for information about [viewing and hosting older versions of the documentation](https://wiki.hyperledger.org/display/BESU/View+older+documentation+versions) on your own infrastructure.
See the Besu wiki for information about [viewing and hosting older versions of the documentation](https://wiki.hyperledger.org/display/BESU/View+older+documentation+versions)
on your own infrastructure.

### Contribute to the docs

Expand Down
3 changes: 0 additions & 3 deletions babel.config.js

This file was deleted.

32 changes: 1 addition & 31 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,37 +59,7 @@ const config = {
},
"24.7.1": {
label: "24.7.1",
},
"24.7.0": {
label: "24.7.0",
},
"24.6.0": {
label: "24.6.0",
},
"24.5.2": {
label: "24.5.2",
},
"24.5.0": {
label: "24.5.0",
},
"24.3.0": {
label: "24.3.0",
},
"24.1.0": {
label: "24.1.0",
},
"23.10.3": {
label: "23.10.3",
},
"23.10.2": {
label: "23.10.2",
},
"23.7.3": {
label: "23.7.3",
},
"23.4.1": {
label: "23.4.1",
},
}
},
routeBasePath: "/",
// @ts-ignore
Expand Down
Loading

0 comments on commit 6e9d2d2

Please sign in to comment.