Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ The Optimism Documentation team has created a complete style guide for you to ma

To set up the Nextra project on your machine, perform the following steps from a terminal instance:

1. Install pnpm [install pnpm](https://pnpm.io/installation).
2. First, run `pnpm i` to install the dependencies.
3. Then, run `pnpm dev` to start the development server and
1. [Install just](https://github.com/casey/just)
2. First, run `just i` to install the dependencies.
3. Then, run `just dev` to start the development server and
Comment on lines +49 to +51
Copy link
Collaborator

Choose a reason for hiding this comment

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

Lets revert these changes. The documentation repository still uses pnpm. The monorepo migrated to just

4. Visit [localhost:3000](http://localhost:3000) in your browser to view the website.

You can now start changing content and see the website updated live each time you save a new file. 🤓
Expand All @@ -57,13 +57,13 @@ You can now start changing content and see the website updated live each time yo

**Important prerequisite**

To prevent building issues upstream, you should build the content locally before submitting a pull request: stop or delete the terminal server if it's running, then run `pnpm dev`.
To prevent building issues upstream, you should build the content locally before submitting a pull request: stop or delete the terminal server if it's running, then run `just dev`.

- Use the information reported by the terminal to fix any issues (e.g., broken links).
- Run `pnpm fix` to automatically fix most linting issues (e.g., formatting and style guide).
- Run `pnpm spellcheck:lint` to test your content against the dictionary. Add new words to the dictionary by appending them to `words.txt`.
- Run `pnpm spellcheck:fix` to add new words to the dictionary automatically.
- Try another `pnpm dev` and repeat until no issues are reported ("client" and "server compiled successfully").
- Run `just fix` to automatically fix most linting issues (e.g., formatting and style guide).
- Run `just spellcheck:lint` to test your content against the dictionary. Add new words to the dictionary by appending them to `words.txt`.
- Run `just spellcheck:fix` to add new words to the dictionary automatically.
- Try another `just dev` and repeat until no issues are reported ("client" and "server compiled successfully").
Comment on lines +60 to +66
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same comment as above



Your pull request should usually target the `main` branch, though the Optimism Documentation team might sometimes ask you to target another branch.
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ This repo houses the Optimism Docs located at [docs.optimism.io](https://docs.op

## Local Development

How to [install pnpm](https://pnpm.io/installation)
How to [Install just](https://github.com/casey/just)

First, run `pnpm i` to install the dependencies.
First, run `just i` to install the dependencies.

Then, run `pnpm dev` to start the development server and visit localhost:3000.
Then, run `just dev` to start the development server and visit localhost:3000.
Comment on lines +7 to +11
Copy link
Collaborator

Choose a reason for hiding this comment

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

revert


## Contributions

Expand Down
53 changes: 53 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# List available recipes
Copy link
Collaborator

Choose a reason for hiding this comment

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

oooohhhhh you added just to the docs project, I'm on the fence about adding it in the docs repo tbh. I'd be interested to hear what the other folks on the docs team think. Its my opinion that because this repository uses javascript as a dependency, it makes sense to keep pnpm as the package manager. It seems like the addition of just is extra overhead. Whereas in the monorepo, the javascript has been removed.

default:
@just --list

# Lint
lint: spellcheck-lint
pnpm eslint . --ext mdx --max-warnings 0

# Fix
fix: spellcheck-fix
pnpm eslint . --ext mdx --fix

# Spellcheck lint
spellcheck-lint:
pnpm cspell lint "**/*.mdx"

# Spellcheck fix
spellcheck-fix:
pnpm cspell --words-only --unique "**/*.mdx" | sort --ignore-case | uniq > words.txt

# Link check
linkcheck:
pnpm lychee --config ./lychee.toml --quiet "./pages"

# Index docs
index-docs:
pnpm ts-node --skip-project utils/algolia-indexer.ts

# Dev server
dev:
pnpm next dev

# Build
build:
pnpm next build

# Start
start:
pnpm next start

# Post-build (sitemap generation)
sitemap:
pnpm next-sitemap

# Full build process
full-build: build sitemap

# Install dependencies
install:
pnpm install

# Run all checks
check: lint linkcheck
Comment on lines +1 to +53
Copy link
Contributor

Choose a reason for hiding this comment

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

Align justfile with PR objectives by replacing pnpm with just.

The file introduces several new commands but continues to use pnpm which contradicts the PR's objective to migrate to just. Consider replacing all instances of pnpm with just or other appropriate commands that align with the new tooling.

Here is a suggested change for one of the commands as an example:

-lint: spellcheck-lint
-    pnpm eslint . --ext mdx --max-warnings 0
+lint: spellcheck-lint
+    just eslint . --ext mdx --max-warnings 0

Apply similar changes to all other commands in the file.

Committable suggestion was skipped due to low confidence.

2 changes: 1 addition & 1 deletion notes/actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Linting

The `lint.yml` workflow checks that all Markdown and JavaScript files conform to the linting standards we apply.
Run `pnpm lint` to lint locally and run `pnpm fix` to fix issues that the linter can fix automatically.
Run `just lint` to lint locally and run `just fix` to fix issues that the linter can fix automatically.
Copy link
Contributor

Choose a reason for hiding this comment

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

Improve readability and formality in linting commands.

The commands have been updated to use just, aligning with the PR's objective. However, the text can be improved for better readability and formality:

  • Consider adding a comma after "lint locally" for better readability.
  • Replace "fix" with "resolve" for a more formal tone.

Apply this diff to improve the text:

-Run `just lint` to lint locally and run `just fix` to fix issues that the linter can fix automatically.
+Run `just lint` to lint locally, and run `just resolve` to resolve issues that the linter can fix automatically.
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
Run `just lint` to lint locally and run `just fix` to fix issues that the linter can fix automatically.
Run `just lint` to lint locally, and run `just resolve` to resolve issues that the linter can fix automatically.
Tools
LanguageTool

[uncategorized] ~6-~6: Possible missing comma found.
Context: ...dards we apply. Run just lint to lint locally and run just fix to fix issues that t...

(AI_HYDRA_LEO_MISSING_COMMA)


[style] ~6-~6: Consider using a different verb for a more formal wording.
Context: ...to lint locally and runjust fix` to fix issues that the linter can fix automati...

(FIX_RESOLVE)

All PRs must pass this check.
Also includes spellchecking via [cspell](https://cspell.org/).

Expand Down
2 changes: 1 addition & 1 deletion notes/algolia-search.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

Indexes for Algolia can be generated and uploaded by running:

`pnpm index:docs`
`just index:docs`

This will generate the appropriate indexes based on the repo's content and upload them to Algolia.

Expand Down
2 changes: 1 addition & 1 deletion notes/remark.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Remark is a flexible Markdown processor with a [vibrant plugin ecosystem](https:

### Adding Rules

To add a linting rule, simply install your desired linting rule via `pnpm` and add the rule to the [`.remarkrc.mjs`](/.remarkrc.mjs) configuration file at the root of this repository.
To add a linting rule, simply install your desired linting rule via `just` and add the rule to the [`.remarkrc.mjs`](/.remarkrc.mjs) configuration file at the root of this repository.
You can find a list of rules maintained by the Remark team on the [`remark-lint`](https://github.com/remarkjs/remark-lint#rules) repository.
If you need to write your own custom plugin, place the plugin inside of [`utils/plugins/remark`](/utils/plugins/remark/)

Expand Down
14 changes: 1 addition & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,6 @@
"name": "op-docs",
"version": "0.0.1",
"description": "Optimism Docs",
"scripts": {
"lint": "eslint . --ext mdx --max-warnings 0 && pnpm spellcheck:lint",
"fix": "eslint . --ext mdx --fix && pnpm spellcheck:fix",
"spellcheck:lint": "cspell lint \"**/*.mdx\"",
"spellcheck:fix": "cspell --words-only --unique \"**/*.mdx\" | sort --ignore-case | uniq > words.txt",
"linkcheck": "lychee --config ./lychee.toml --quiet \"./pages\"",
"index:docs": "npx ts-node --skip-project utils/algolia-indexer.ts",
"dev": "next dev",
"build": "next build",
"start": "next start",
"postbuild": "next-sitemap"
},
"dependencies": {
"@eth-optimism/contracts-ts": "^0.17.0",
"@eth-optimism/tokenlist": "^9.0.9",
Expand Down Expand Up @@ -65,4 +53,4 @@
"[email protected]": "patches/[email protected]"
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ cd op-sample-project

{<h3>Initialize the Project</h3>}

Set up the project as a basic Node.js project with `pnpm` or your favorite package manager.
Set up the project as a basic Node.js project with `just` or your favorite package manager.

```bash
pnpm init
Expand Down
2 changes: 1 addition & 1 deletion pages/builders/chain-operators/deploy/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ communication and reconciliation between state changes.
| [git](https://git-scm.com/) | `^2` | `git --version` |
| [go](https://go.dev/) | `^1.21` | `go version` |
| [node](https://nodejs.org/en/) | `^20` | `node --version` |
| [pnpm](https://pnpm.io/installation) | `^8` | `pnpm --version` |
| [just](https://github.com/casey/just) | `^1.34.0`| `just --version` |
Copy link
Contributor

Choose a reason for hiding this comment

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

Update to just is well-executed, but consider additional formatting improvements.

The migration from pnpm to just is accurately reflected in the documentation. However, ensure that:

  • Proper nouns are used consistently.
  • The imperative form is maintained throughout.
  • Proper capitalization and the Oxford comma are used where necessary.

The code changes are approved.

Consider reviewing the entire document to ensure it aligns with the best practices for Markdown documentation as specified in the additional instructions.

| [foundry](https://github.com/foundry-rs/foundry#installation) | `^0.2.0` | `forge --version` |
| [make](https://linux.die.net/man/1/make) | `^3` | `make --version` |
| [jq](https://github.com/jqlang/jq) | `^1.6` | `jq --version` |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Make sure to check out the [Superchain Explainer](/stack/explainer) to learn mor
| [git](https://git-scm.com/) | `^2` | `git --version` |
| [go](https://go.dev/) | `^1.21` | `go version` |
| [node](https://nodejs.org/en/) | `^20` | `node --version` |
| [pnpm](https://pnpm.io/installation) | `^8` | `pnpm --version` |
| [just](https://github.com/casey/just) | `^1.34.0`| `just --version` |
| [foundry](https://github.com/foundry-rs/foundry#installation) | `^0.2.0` | `forge --version` |
| [make](https://linux.die.net/man/1/make) | `^3` | `make --version` |
| [jq](https://github.com/jqlang/jq) | `^1.6` | `jq --version` |
Expand Down Expand Up @@ -141,14 +141,14 @@ If you don't have the correct versions installed, you may run into unexpected er
{<h3>Install dependencies</h3>}

```bash
pnpm install
just install
Copy link
Collaborator

Choose a reason for hiding this comment

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

```

{<h3>Build the various packages inside of the Optimism Monorepo</h3>}

```bash
make op-node op-batcher op-proposer
pnpm build
just build
Copy link
Collaborator

Choose a reason for hiding this comment

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

same comment as above

```

</Steps>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ In this tutorial you will build the `l2geth` implementation of Legacy Geth as fo
| [git](https://git-scm.com/) | `^2` | `git --version` |
| [go](https://go.dev/) | `^1.21` | `go version` |
| [node](https://nodejs.org/en/) | `^20` | `node --version` |
| [pnpm](https://pnpm.io/installation) | `^8` | `pnpm --version` |
| [just](https://github.com/casey/just) | `^1.34.0`| `just --version` |
Copy link
Contributor

Choose a reason for hiding this comment

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

Update to just is well-executed, but consider additional formatting improvements.

The migration from pnpm to just is accurately reflected in the documentation. However, ensure that:

  • Proper nouns are used consistently.
  • The imperative form is maintained throughout.
  • Proper capitalization and the Oxford comma are used where necessary.

The code changes are approved.

Consider reviewing the entire document to ensure it aligns with the best practices for Markdown documentation as specified in the additional instructions.

| [foundry](https://github.com/foundry-rs/foundry#installation) | `^0.2.0` | `forge --version` |
| [make](https://linux.die.net/man/1/make) | `^4` | `make --version` |

Expand Down Expand Up @@ -85,15 +85,15 @@ Some releases may only be required for the OP Sepolia testnet.
Install the Node.js dependencies for the Optimism Monorepo.
Copy link
Collaborator

Choose a reason for hiding this comment

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

There is no longer javascript/nodejs in the monorepo


```bash
pnpm install
just install
Copy link
Collaborator

Choose a reason for hiding this comment

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

```

{<h3>Build Node.js packages</h3>}

Build the Node.js packages for the Optimism Monorepo.

```bash
pnpm build
just build
Copy link
Collaborator

Choose a reason for hiding this comment

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

same comment

```

{<h3>Build op-node</h3>}
Expand Down
Loading