Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 4 additions & 0 deletions .cursor/rules/contributor-workflow.mdc
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ Keeping rule files current prevents stale guidance from producing incorrect cont

## CI linting

Pull requests run **`npm run format:check`** (Prettier against `.prettierrc` and `.prettierignore`). Run
**`npm run format`** locally to fix style before pushing. Generated Snaps API pages under
`snaps/reference/snaps-api/` are excluded from formatting in git (see `.prettierignore`).

Pull requests are checked by a Vale-based linter
([docs-spelling-check](https://github.com/Consensys/github-actions/tree/main/docs-spelling-check))
that enforces Microsoft style, Consensys terminology, and spelling. Fix any linter warnings before
Expand Down
7 changes: 6 additions & 1 deletion .cursor/rules/markdown-formatting.mdc
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,13 @@ for full details. The rules below cover the most common conventions.
## Code blocks

- Always specify the language on fenced code blocks (` ```javascript `, ` ```bash `, etc.).
- Use double quotes in JavaScript code samples.
- Indent code with two spaces, not four.
- In JavaScript, TypeScript, JSX, and TSX samples, use single-quoted string literals.
- In JSON samples, keep double-quoted keys and strings (required by JSON syntax).
- In any other language (for example, Swift, Kotlin, Dart, Solidity, Python, shell), follow that
language's normal conventions for string quotes.
- After editing documentation, run `npm run format` so Prettier applies these rules to fenced code
in Markdown/MDX (see `.prettierrc`).
- For npm install commands, use ` ```bash npm2yarn ` fences to produce automatic npm/yarn tabs.
- Write code samples that can be copied, pasted, and run as-is. Do not include shell prompts
(for example, `user@host $`) or trailing comments that break execution.
Expand Down
8 changes: 4 additions & 4 deletions .cursor/skills/author-page/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ description: <one sentence>

## Next steps

- [<Related content>](<link>)
- [<Related content>](link)
```

**Quickstart** (for `quickstart/` or `get-started/` folders):
Expand Down Expand Up @@ -134,7 +134,7 @@ description: <one sentence>

## Next steps

- [<Extend this with a how-to guide>](<link>)
- [<Extend this with a how-to guide>](link)
```

**Reference** (for `reference/` folders):
Expand Down Expand Up @@ -192,7 +192,7 @@ description: <one sentence>

## Next steps

- [<More advanced guide>](<link>)
- [<More advanced guide>](link)
```

**Troubleshooting** (for `troubleshooting/` folders):
Expand Down Expand Up @@ -233,7 +233,7 @@ Fill in the scaffold with content based on what the user provides. Follow these
Before finishing, check:

- [ ] Frontmatter has `description`; add `sidebar_label` only when the default nav label would be
too long or wordy (see `markdown-formatting.mdc`).
too long or wordy (see `markdown-formatting.mdc`).
- [ ] Opening paragraph answers "what" and "why" in the first 1-2 sentences.
- [ ] Structure matches the content type.
- [ ] Terminology matches `terminology.mdc` and the product rule file.
Expand Down
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ Fixes #
<!-- If you are an external contributor (outside of the MetaMask organization), complete the following checklist. -->

- [ ] I've read the [contribution guidelines](https://github.com/MetaMask/metamask-docs/blob/main/CONTRIBUTING.md).
- [ ] I've created a new issue (or assigned myself to an existing issue) describing what this PR addresses.
- [ ] I've created a new issue (or assigned myself to an existing issue) describing what this PR addresses.
10 changes: 5 additions & 5 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
- package-ecosystem: 'npm'
directory: '/'
schedule:
interval: "weekly"
day: "sunday"
interval: 'weekly'
day: 'sunday'
assignees:
- "protocol-galileo"
- 'protocol-galileo'
15 changes: 15 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,21 @@ jobs:
- name: Lint
uses: ConsenSys/github-actions/docs-lint-all@main

prettier:
name: Prettier
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Use Node.js
uses: actions/setup-node@v6
with:
node-version-file: '.nvmrc'
cache: npm
- name: Install dependencies
run: npm ci
- name: Check formatting
run: npm run format:check

spelling:
name: Spelling
runs-on: ubuntu-latest
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/crowdin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Crowdin Action

on:
push:
paths: ["i18n/**"]
paths: ['i18n/**']
branches: [main]

permissions: write-all
Expand All @@ -23,9 +23,9 @@ jobs:
localization_branch_name: l10n_crowdin_translations

create_pull_request: true
pull_request_title: "New Crowdin translations"
pull_request_body: "New Crowdin pull request with translations"
pull_request_base_branch_name: "main"
pull_request_title: 'New Crowdin translations'
pull_request_body: 'New Crowdin pull request with translations'
pull_request_base_branch_name: 'main'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dependency_review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
folder: ["docs"]
folder: ['docs']
permissions:
contents: read
steps:
Expand Down
76 changes: 38 additions & 38 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
---
name: Nightly check

on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch: {}

concurrency:
group: nightly-${{ github.ref }}
cancel-in-progress: true

jobs:
linkCheckMdx:
name: Run link check on .mdx files
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v6
- name: LinkCheck mdx files
uses: ConsenSys/github-actions/docs-link-check@main
with:
FILE_EXTENSION: mdx
MODIFIED_FILES_ONLY: no
name: Nightly check

linkCheckMd:
needs: linkCheckMdx
name: Run link check on .md files
if: always()
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v6
- name: LinkCheck md files
uses: ConsenSys/github-actions/docs-link-check@main
with:
FILE_EXTENSION: md
MODIFIED_FILES_ONLY: no
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch: {}

concurrency:
group: nightly-${{ github.ref }}
cancel-in-progress: true

jobs:
linkCheckMdx:
name: Run link check on .mdx files
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v6
- name: LinkCheck mdx files
uses: ConsenSys/github-actions/docs-link-check@main
with:
FILE_EXTENSION: mdx
MODIFIED_FILES_ONLY: no

linkCheckMd:
needs: linkCheckMdx
name: Run link check on .md files
if: always()
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v6
- name: LinkCheck md files
uses: ConsenSys/github-actions/docs-link-check@main
with:
FILE_EXTENSION: md
MODIFIED_FILES_ONLY: no
2 changes: 1 addition & 1 deletion .github/workflows/trivy-cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
- main
workflow_dispatch:
schedule:
- cron: "0 1 * * *"
- cron: '0 1 * * *'

jobs:
trivy:
Expand Down
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
.env.development.local
.env.test.local
.env.production.local
.prettierignore

npm-debug.log*
.vercel
.envrc
Expand Down
56 changes: 28 additions & 28 deletions .linkspector.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,32 +13,32 @@ excludedDirs:
useGitIgnore: true

ignorePatterns:
- pattern: '^http(s)?://localhost'
- pattern: '^http(s)?://127.0.0.1'
- pattern: '^http(s)?://gitlab.com/ConsenSys/'
- pattern: '^http(s)?://consensys.net'
- pattern: '^http(s)?://.+.zendesk.com'
- pattern: '^http(s)?://.+.etherscan.io'
- pattern: '^http(s)?://help.figma.com'
- pattern: '^http(s)?://metamask.io'
- pattern: '^http(s)?://rivet.cloud'
- pattern: '^http(s)?://docs.arbitrum.io($|/.*)'
- pattern: '^/img/'
- pattern: '^/smart-accounts-kit/'
- pattern: '^/developer-tools/'
- pattern: '^/embedded-wallets/'
- pattern: '^/metamask-connect/'
- pattern: '^/services/'
- pattern: '^/snaps/'
- pattern: '^/wallet/'
- pattern: '^/tutorials/'
- pattern: '^/quickstart/'
- pattern: 'https://web3onboard.thirdweb.com'
- pattern: 'https://0xfury.com/privacy'
- pattern: '^https://docs.arbitrum.io'
- pattern: '^https://nodefleet.org'
- pattern: '^http(s)?://localhost'
- pattern: '^http(s)?://127.0.0.1'
- pattern: '^http(s)?://gitlab.com/ConsenSys/'
- pattern: '^http(s)?://consensys.net'
- pattern: '^http(s)?://.+.zendesk.com'
- pattern: '^http(s)?://.+.etherscan.io'
- pattern: '^http(s)?://help.figma.com'
- pattern: '^http(s)?://metamask.io'
- pattern: '^http(s)?://rivet.cloud'
- pattern: '^http(s)?://docs.arbitrum.io($|/.*)'
- pattern: '^/img/'
- pattern: '^/smart-accounts-kit/'
- pattern: '^/developer-tools/'
- pattern: '^/embedded-wallets/'
- pattern: '^/metamask-connect/'
- pattern: '^/services/'
- pattern: '^/snaps/'
- pattern: '^/wallet/'
- pattern: '^/tutorials/'
- pattern: '^/quickstart/'
- pattern: 'https://web3onboard.thirdweb.com'
- pattern: 'https://0xfury.com/privacy'
- pattern: '^https://docs.arbitrum.io'
- pattern: '^https://nodefleet.org'
aliveStatusCodes:
- 200
- 206
- 400
- 403
- 200
- 206
- 400
- 403
16 changes: 16 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Dependencies and build output
node_modules
build
.docusaurus
.cache-loader
.yarn

# Lockfile (large, noisy diffs; not prose/code style)
package-lock.json

# Generated at build / not committed (see .gitignore)
snaps/reference/snaps-api/*.mdx

# Optional local tooling
.env
.env.*
11 changes: 7 additions & 4 deletions .stylelintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@
"extends": "stylelint-config-standard",
"rules": {
"selector-class-pattern": null,
"selector-pseudo-class-no-unknown": [true, {
"ignorePseudoClasses": ["global"]
}]
"selector-pseudo-class-no-unknown": [
true,
{
"ignorePseudoClasses": ["global"]
}
]
}
}
}
16 changes: 8 additions & 8 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ dapp developers and wallet extension builders.

## Products

| Product | Path | Sidebar file | Description |
|----------------------|-------------------------|--------------------------|-------------------------------------------------------|
| MetaMask Connect | `metamask-connect/` | `mm-connect-sidebar.js` | Connect dapps to MetaMask extension and mobile, across EVM, Solana, and multichain. |
| Embedded Wallets | `embedded-wallets/` | `ew-sidebar.js` | Embed wallet functionality directly into applications. |
| Smart Accounts Kit | `smart-accounts-kit/` | `gator-sidebar.js` | Create smart accounts with delegated permissions, and request advanced permissions. |
| Services | `services/` | `services-sidebar.js` | Ease dapp development using Infura and related infrastructure APIs. |
| Snaps | `snaps/` | `snaps-sidebar.js` | Extend MetaMask by creating custom mini-apps. |
| Developer dashboard | `developer-tools/dashboard` | `dashboard-sidebar.js` | Manage Infura API keys, monitor usage, and access account info. |
| Product | Path | Sidebar file | Description |
| ------------------- | --------------------------- | ----------------------- | ----------------------------------------------------------------------------------- |
| MetaMask Connect | `metamask-connect/` | `mm-connect-sidebar.js` | Connect dapps to MetaMask extension and mobile, across EVM, Solana, and multichain. |
| Embedded Wallets | `embedded-wallets/` | `ew-sidebar.js` | Embed wallet functionality directly into applications. |
| Smart Accounts Kit | `smart-accounts-kit/` | `gator-sidebar.js` | Create smart accounts with delegated permissions, and request advanced permissions. |
| Services | `services/` | `services-sidebar.js` | Ease dapp development using Infura and related infrastructure APIs. |
| Snaps | `snaps/` | `snaps-sidebar.js` | Extend MetaMask by creating custom mini-apps. |
| Developer dashboard | `developer-tools/dashboard` | `dashboard-sidebar.js` | Manage Infura API keys, monitor usage, and access account info. |

## Editorial standards

Expand Down
4 changes: 2 additions & 2 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module.exports = {
presets: [require.resolve("@docusaurus/core/lib/babel/preset")],
};
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
}
18 changes: 9 additions & 9 deletions dashboard-sidebar.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
const sidebar = {
dashboardSidebar: [
"index",
'index',
{
type: "category",
label: "Get started",
type: 'category',
label: 'Get started',
collapsed: false,
items: [{ type: "autogenerated", dirName: "get-started" }],
items: [{ type: 'autogenerated', dirName: 'get-started' }],
},
{
type: "category",
label: "How to",
type: 'category',
label: 'How to',
collapsed: false,
items: [{ type: "autogenerated", dirName: "how-to" }],
items: [{ type: 'autogenerated', dirName: 'how-to' }],
},
],
};
}

module.exports = sidebar;
module.exports = sidebar
3 changes: 1 addition & 2 deletions developer-tools/dashboard/how-to/credit-usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,4 @@ View your usage for the previous 24 hours, 7 days, or 30 days by methods used, n
src={require('../../images/credit-usage.png').default}
/>
</div>
</div>

</div>
Loading
Loading