Skip to content

Commit 164ef19

Browse files
committed
move contributing formatting to new page
1 parent 706d5d2 commit 164ef19

2 files changed

Lines changed: 29 additions & 18 deletions

File tree

CONTRIBUTING.md

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,6 @@ Thank you for your interest in contributing to ENSNode! We welcome contributions
66

77
For detailed setup instructions, visit the [ENSNode Contributing Guide](https://ensnode.io/docs/reference/contributing).
88

9-
## Using Biome and Prettier together
10-
11-
Biome is our primary formatter; the long-term goal is to use it for everything. Two gaps remain today:
12-
13-
- Biome doesn't format Markdown, so Prettier handles `**/*.{md,mdx}` repo-wide.
14-
- Biome's `.astro` support only covers the frontmatter (the `---` script block). Prettier with `prettier-plugin-astro` handles the template portion in `docs/ensnode.io` and `docs/ensrainbow.io`. The `astroSkipFrontmatter: true` option keeps Biome in charge of the frontmatter so the two formatters don't fight over the same code.
15-
16-
Run `pnpm lint` at the monorepo root to apply both. CI runs `pnpm lint:ci` (check-only).
17-
18-
### Windows: line-ending diffs
19-
20-
Git on Windows defaults to checking files out with CRLF (`\r\n`) line endings, but Biome and Prettier always write LF (`\n`). After running `pnpm lint`, files can show as modified even though Git will normalize them back to LF when staged — so the change wouldn't actually land in a commit.
21-
22-
To clear the noise, pick one:
23-
24-
- One-off: `git add --all`. Staging normalizes the line endings and the entries drop out of `git status`.
25-
- Permanent: `git config --global core.autocrlf input`, then `git checkout -- .` to convert your working tree to LF. Future checkouts won't reintroduce CRLF.
26-
279
## Getting Help
2810

2911
If you have questions or need help, please:
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
title: Formatting with Biome and Prettier
3+
sidebar:
4+
label: Formatting
5+
order: 6
6+
---
7+
8+
Biome is our primary formatter; the long-term goal is to use it for everything. Two gaps remain today:
9+
10+
- Biome doesn't format Markdown, so Prettier handles `**/*.{md,mdx}` repo-wide.
11+
- Biome's `.astro` support only covers the frontmatter (the `---` script block). Prettier with [`prettier-plugin-astro`](https://github.com/withastro/prettier-plugin-astro) handles the template portion in `docs/ensnode.io` and `docs/ensrainbow.io`. The `astroSkipFrontmatter: true` option keeps Biome in charge of the frontmatter so the two formatters don't fight over the same code.
12+
13+
## Running the formatters
14+
15+
```bash
16+
# from the monorepo root
17+
pnpm lint
18+
```
19+
20+
CI runs `pnpm lint:ci` (check-only) on every PR.
21+
22+
## Windows: line-ending diffs
23+
24+
Git on Windows defaults to checking files out with CRLF (`\r\n`) line endings, but Biome and Prettier always write LF (`\n`). After running `pnpm lint`, files can show as modified even though Git will normalize them back to LF when staged — so the change wouldn't actually land in a commit.
25+
26+
To clear the noise, pick one:
27+
28+
- **One-off**: `git add --all`. Staging normalizes the line endings and the entries drop out of `git status`.
29+
- **Permanent**: `git config --global core.autocrlf input`, then `git checkout -- .` to convert your working tree to LF. Future checkouts won't reintroduce CRLF.

0 commit comments

Comments
 (0)