From 1111980dde8e96ca0a30acc3b4df0ca4f4aabbb8 Mon Sep 17 00:00:00 2001 From: Niall Thomson Date: Tue, 10 Dec 2024 16:23:31 -0700 Subject: [PATCH] Add docs, fix some prettier issues --- .prettierrc | 2 +- Makefile | 4 + docs/authoring_content.md | 25 +++-- .../theme/DocSidebarItem/Category/index.js | 4 +- yarn.lock | 91 +++++-------------- 5 files changed, 46 insertions(+), 80 deletions(-) diff --git a/.prettierrc b/.prettierrc index 9e26dfeeb..0967ef424 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1 +1 @@ -{} \ No newline at end of file +{} diff --git a/Makefile b/Makefile index 929397595..4a70357ee 100644 --- a/Makefile +++ b/Makefile @@ -40,3 +40,7 @@ create-infrastructure: .PHONY: destroy-infrastructure destroy-infrastructure: bash hack/destroy-infrastructure.sh $(environment) + +.PHONY: lint +lint: + yarn lint \ No newline at end of file diff --git a/docs/authoring_content.md b/docs/authoring_content.md index 3bcc00ad5..4d2d579ff 100644 --- a/docs/authoring_content.md +++ b/docs/authoring_content.md @@ -2,8 +2,6 @@ This guide outlines how to author content for the workshop, whether adding new content or modifying existing content. - - 1. [Pre-requisites](#pre-requisites) 1. [Create a work branch](#create-a-work-branch) 1. [Environment setup](#environment-setup) @@ -13,7 +11,6 @@ This guide outlines how to author content for the workshop, whether adding new c 1. [Cleaning up your lab](#cleaning-up-your-lab) 1. [Testing](#testing) 1. [Tear down AWS resources](#raising-a-pull-request) - ## Pre-requisites @@ -24,7 +21,7 @@ The following pre-requisites are necessary to work on the content: - Docker - `make` - `jq` - - `npm` + - Node.js + `yarn` - `kubectl` ## Create a work branch @@ -42,13 +39,13 @@ To start developing you'll need to run some initial commands. First install the dependencies by running the following command in the root of the repository. -``` +```bash make install ``` Once this is complete you can run the following command to start the development server: -``` +```bash make serve ``` @@ -76,13 +73,13 @@ Many of the convenience scripts we'll use will make calls to AWS APIs so will ne You can then use the following convenience command to create the infrastructure: -``` +```bash make create-infrastructure ``` Once you're finished with the test environment you can delete all of the infrastructure using the following convenience command: -``` +```bash make destroy-infrastructure ``` @@ -231,6 +228,18 @@ There is an automated testing capability provided with the workshop that allows See this [doc](./automated_tests.md) for more information on automated tests. +## Before your Pull Request + +The last step is to ensure that your submission passes all of the linting checks. These are in place to keep the codebase consistent and avoid issues such as basic spelling mistakes. + +```bash +make lint +``` + +If you need to add a new word to the dictionary see the file `.spelling`. + +You can resolve prettier formatting problems using `yarn format:fix`. + ## Raising a Pull Request Once your content is completed and is tested appropriately please raise a Pull Request to the `main` branch. This will trigger review processes before the content is merged. All status checks must pass before the PR will be merged, if a check fails then please check the error and attempt to resolve it. If you need assistance then leave a comment on the PR. diff --git a/website/src/theme/DocSidebarItem/Category/index.js b/website/src/theme/DocSidebarItem/Category/index.js index c1e150a7d..d64f3122c 100644 --- a/website/src/theme/DocSidebarItem/Category/index.js +++ b/website/src/theme/DocSidebarItem/Category/index.js @@ -164,7 +164,9 @@ export default function DocSidebarItemCategory({ aria-current={isCurrentPage ? "page" : undefined} role={collapsible && !href ? "button" : undefined} aria-expanded={collapsible && !href ? !collapsed : undefined} - href={collapsible ? hrefWithSSRFallback ?? "#" : hrefWithSSRFallback} + href={ + collapsible ? (hrefWithSSRFallback ?? "#") : hrefWithSSRFallback + } {...props} >
diff --git a/yarn.lock b/yarn.lock index ac4d832db..9c49a5145 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3032,43 +3032,6 @@ __metadata: languageName: node linkType: hard -"@oozcitak/dom@npm:1.15.10": - version: 1.15.10 - resolution: "@oozcitak/dom@npm:1.15.10" - dependencies: - "@oozcitak/infra": "npm:1.0.8" - "@oozcitak/url": "npm:1.0.4" - "@oozcitak/util": "npm:8.3.8" - checksum: 10c0/128162dd35fd21976e7589a4b50e980d8fb72e1f90e5675a3baca70b23cfdd87c0df57bff1ec708e7927671247a7233f240a27a4546bb904e069be1b4d4d7a05 - languageName: node - linkType: hard - -"@oozcitak/infra@npm:1.0.8": - version: 1.0.8 - resolution: "@oozcitak/infra@npm:1.0.8" - dependencies: - "@oozcitak/util": "npm:8.3.8" - checksum: 10c0/5fa44f02abbad453f5b26b38e2934978c177ef3a1baf8bf53919991135268f55bc89e23f8f3edebf0973c6a7d72d98fededb666c04a8b22ee4ca3048d0d42d25 - languageName: node - linkType: hard - -"@oozcitak/url@npm:1.0.4": - version: 1.0.4 - resolution: "@oozcitak/url@npm:1.0.4" - dependencies: - "@oozcitak/infra": "npm:1.0.8" - "@oozcitak/util": "npm:8.3.8" - checksum: 10c0/49824e30219b1e3bd0133c7302e79ead18dbfff91bc1ebb2f05b3c2cd670ed07b36af0f933faba2bc3221f65ef068fb7fca7d6c3cb8053fbca45f8cdf5670147 - languageName: node - linkType: hard - -"@oozcitak/util@npm:8.3.8": - version: 8.3.8 - resolution: "@oozcitak/util@npm:8.3.8" - checksum: 10c0/1c492abcba79f5dd9bd7709331a614114706e6936a899cac6ac90b63bbe8e98da288e664c13c6acb2a38e3c5ffd47b93f824075ba81384d6192cc364bf126775 - languageName: node - linkType: hard - "@parcel/watcher-android-arm64@npm:2.5.0": version: 2.5.0 resolution: "@parcel/watcher-android-arm64@npm:2.5.0" @@ -4502,7 +4465,7 @@ __metadata: languageName: node linkType: hard -"async@npm:^3.2.6": +"async@npm:^3.2.5": version: 3.2.6 resolution: "async@npm:3.2.6" checksum: 10c0/36484bb15ceddf07078688d95e27076379cc2f87b10c03b6dd8a83e89475a3c8df5848859dd06a4c95af1e4c16fc973de0171a77f18ea00be899aca2a4f85e70 @@ -6381,7 +6344,7 @@ __metadata: dependencies: cspell: "npm:^8.8.1" lint-staged: "npm:^15.2.7" - markdown-link-check: "npm:^3.12.1" + markdown-link-check: "npm:3.12.2" markdownlint-cli2: "npm:^0.16.0" npm-run-all: "npm:^4.1.5" prettier: "npm:^3.2.5" @@ -9161,26 +9124,26 @@ __metadata: languageName: node linkType: hard -"js-yaml@npm:3.14.1, js-yaml@npm:^3.13.1": - version: 3.14.1 - resolution: "js-yaml@npm:3.14.1" +"js-yaml@npm:4.1.0, js-yaml@npm:^4.1.0": + version: 4.1.0 + resolution: "js-yaml@npm:4.1.0" dependencies: - argparse: "npm:^1.0.7" - esprima: "npm:^4.0.0" + argparse: "npm:^2.0.1" bin: js-yaml: bin/js-yaml.js - checksum: 10c0/6746baaaeac312c4db8e75fa22331d9a04cccb7792d126ed8ce6a0bbcfef0cedaddd0c5098fade53db067c09fe00aa1c957674b4765610a8b06a5a189e46433b + checksum: 10c0/184a24b4eaacfce40ad9074c64fd42ac83cf74d8c8cd137718d456ced75051229e5061b8633c3366b8aada17945a7a356b337828c19da92b51ae62126575018f languageName: node linkType: hard -"js-yaml@npm:4.1.0, js-yaml@npm:^4.1.0": - version: 4.1.0 - resolution: "js-yaml@npm:4.1.0" +"js-yaml@npm:^3.13.1": + version: 3.14.1 + resolution: "js-yaml@npm:3.14.1" dependencies: - argparse: "npm:^2.0.1" + argparse: "npm:^1.0.7" + esprima: "npm:^4.0.0" bin: js-yaml: bin/js-yaml.js - checksum: 10c0/184a24b4eaacfce40ad9074c64fd42ac83cf74d8c8cd137718d456ced75051229e5061b8633c3366b8aada17945a7a356b337828c19da92b51ae62126575018f + checksum: 10c0/6746baaaeac312c4db8e75fa22331d9a04cccb7792d126ed8ce6a0bbcfef0cedaddd0c5098fade53db067c09fe00aa1c957674b4765610a8b06a5a189e46433b languageName: node linkType: hard @@ -9327,7 +9290,7 @@ __metadata: languageName: node linkType: hard -"link-check@npm:^5.4.0": +"link-check@npm:^5.3.0": version: 5.4.0 resolution: "link-check@npm:5.4.0" dependencies: @@ -9623,22 +9586,22 @@ __metadata: languageName: node linkType: hard -"markdown-link-check@npm:^3.12.1": - version: 3.13.6 - resolution: "markdown-link-check@npm:3.13.6" +"markdown-link-check@npm:3.12.2": + version: 3.12.2 + resolution: "markdown-link-check@npm:3.12.2" dependencies: - async: "npm:^3.2.6" + async: "npm:^3.2.5" chalk: "npm:^5.3.0" commander: "npm:^12.1.0" - link-check: "npm:^5.4.0" + link-check: "npm:^5.3.0" + lodash: "npm:^4.17.21" markdown-link-extractor: "npm:^4.0.2" needle: "npm:^3.3.1" progress: "npm:^2.0.3" proxy-agent: "npm:^6.4.0" - xmlbuilder2: "npm:^3.1.1" bin: markdown-link-check: markdown-link-check - checksum: 10c0/7a70ba129ef70c2669d9289f9753b5ab17d609ad78b44d78d82957a09034cb49fa176c01c1af7d0c0046c51df32725a2e055a92bae171c80c1dc80008172e574 + checksum: 10c0/c1d4d2f69322d1ed98437db9f37807f982a3dc9aa1203841f40c71ac4e2a733b6c36311aa6f7f3a6fc34d7713e51c0f3704d55bf59fc607b30360ecfb5465d2d languageName: node linkType: hard @@ -15305,18 +15268,6 @@ __metadata: languageName: node linkType: hard -"xmlbuilder2@npm:^3.1.1": - version: 3.1.1 - resolution: "xmlbuilder2@npm:3.1.1" - dependencies: - "@oozcitak/dom": "npm:1.15.10" - "@oozcitak/infra": "npm:1.0.8" - "@oozcitak/util": "npm:8.3.8" - js-yaml: "npm:3.14.1" - checksum: 10c0/a3e7dd5cbc052f6b53773a4a9d5efb26b0647aa8868bc1a597478d534e78184263b5b3e495e82613f21d0bf016a24145bb793f6e197e8911139dddba9cd831cc - languageName: node - linkType: hard - "xtend@npm:^4.0.0": version: 4.0.2 resolution: "xtend@npm:4.0.2"