Skip to content
Merged
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
6 changes: 4 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,10 @@ jobs:
cache: npm
cache-dependency-path: package-lock.json
- run: npm ci
# Static gates (§2.4a): types must check and lint must be clean before we
# spend time on the full multi-locale build + browser suites.
# Static gates (§2.4a): format, types, and lint must all be clean before
# we spend time on the full multi-locale build + browser suites.
- name: format check (prettier)
run: npm run format:check
- run: npm run typecheck # tsc --noEmit across the TS surface
- run: npm run lint # eslint . — zero errors (§2.4a/§6.4)
# onBrokenLinks/onBrokenAnchors: "throw" (docusaurus.config.ts) means this
Expand Down
38 changes: 38 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Prettier formats the CODE surface only (src/**, scripts/**, tests/**, root
# configs) — it must NEVER touch docs content or i18n translations. Reformatting
# 1155+ md/mdx files across 14 locales would be an enormous, unsafe diff that
# violates the ecosystem's docs-integrity (§4.3) and i18n (§6.6) rules.

# CI workflows are YAML, not part of the JS/TS code surface this gate covers
.github/

# build/tooling output
node_modules/
dist/
build/
.docusaurus/
coverage/
playwright-report/
test-results/

# docs content — every locale, every format
docs/
i18n/
blog/
**/*.md
**/*.mdx

# generated/static artifacts (machine specs, sitemaps, llms.txt, openrpc, etc.)
static/
**/knowledge-graph.json
**/machine-specs.json
**/openrpc*.json
**/dht-methods.json
**/error-codes.json
**/llms.txt
**/sitemap*.xml
**/robots.txt

# lockfiles + changelog (generated, never hand-formatted)
package-lock.json
CHANGELOG.md
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"printWidth": 100,
"singleQuote": false,
"trailingComma": "all",
"semi": true,
"tabWidth": 2
}
2 changes: 1 addition & 1 deletion 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")],
};
26 changes: 19 additions & 7 deletions commitlint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,27 @@
// (fix -> patch, feat -> minor, ! / BREAKING CHANGE -> major).
// Enforced in CI by .github/workflows/commitlint.yml (wagoid/commitlint-github-action).
export default {
extends: ['@commitlint/config-conventional'],
extends: ["@commitlint/config-conventional"],
rules: {
'type-enum': [
"type-enum": [
2,
'always',
['feat', 'fix', 'docs', 'style', 'refactor', 'perf', 'test', 'build', 'ci', 'chore', 'revert'],
"always",
[
"feat",
"fix",
"docs",
"style",
"refactor",
"perf",
"test",
"build",
"ci",
"chore",
"revert",
],
],
'subject-case': [0], // allow any subject casing (proper nouns, scheme literals like chia://)
'body-max-line-length': [0], // long bodies (URLs, logs) are fine
'footer-max-line-length': [0],
"subject-case": [0], // allow any subject casing (proper nouns, scheme literals like chia://)
"body-max-line-length": [0], // long bodies (URLs, logs) are fine
"footer-max-line-length": [0],
},
};
3 changes: 1 addition & 2 deletions docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ import type * as Preset from "@docusaurus/preset-classic";

const config: Config = {
title: "DIG Network",
tagline:
"A Proof-of-Stake Layer 2 on Chia — developer docs for the network and its primitives.",
tagline: "A Proof-of-Stake Layer 2 on Chia — developer docs for the network and its primitives.",
favicon: "img/favicon.png",

url: "https://docs.dig.net",
Expand Down
4 changes: 4 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import globals from "globals";
import reactHooks from "eslint-plugin-react-hooks";
import jsxA11y from "eslint-plugin-jsx-a11y";
import tseslint from "typescript-eslint";
import prettierConfig from "eslint-config-prettier";

export default tseslint.config(
{
Expand Down Expand Up @@ -65,4 +66,7 @@ export default tseslint.config(
"@typescript-eslint/no-unused-vars": ["error", { argsIgnorePattern: "^_" }],
},
},
// Must stay LAST: disables ESLint's stylistic rules so it never fights
// Prettier's formatting opinions (§2.4a — format and lint are separate gates).
prettierConfig,
);
38 changes: 36 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "docs-dig-net",
"version": "0.7.2",
"version": "0.7.3",
"private": true,
"scripts": {
"docusaurus": "docusaurus",
Expand All @@ -19,7 +19,9 @@
"write-translations": "docusaurus write-translations",
"write-heading-ids": "docusaurus write-heading-ids",
"typecheck": "tsc",
"lint": "eslint .",
"lint": "eslint . --max-warnings 0",
"format": "prettier --write .",
"format:check": "prettier --check .",
"test:unit": "node --test tests/unit/",
"test:e2e": "playwright test",
"test:a11y": "playwright test tests/e2e/a11y.spec.ts tests/e2e/mobile-nav.spec.ts tests/e2e/aria-snapshot.spec.ts tests/e2e/keyboard-nav.spec.ts",
Expand All @@ -45,11 +47,13 @@
"@playwright/test": "^1.61.1",
"autoprefixer": "^10.4.20",
"eslint": "^9.39.5",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-jsx-a11y": "^6.10.2",
"eslint-plugin-react-hooks": "^5.2.0",
"globals": "^15.15.0",
"jsdom": "^29.1.1",
"postcss": "^8.4.47",
"prettier": "^3.9.6",
"tailwindcss": "^3.4.14",
"typescript": "~5.5.2",
"typescript-eslint": "^8.64.0"
Expand Down
2 changes: 1 addition & 1 deletion postcss.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
}
},
};
Loading
Loading