Skip to content

Commit a478df0

Browse files
add lint, spellcheck to ci
1 parent f679f5c commit a478df0

25 files changed

Lines changed: 5660 additions & 638 deletions

.eslintrc.js

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
module.exports = {
2+
env: {
3+
browser: true,
4+
es2021: true,
5+
},
6+
extends: ["eslint:recommended", "plugin:react/recommended"],
7+
parserOptions: {
8+
ecmaFeatures: {
9+
jsx: true,
10+
},
11+
ecmaVersion: "latest",
12+
sourceType: "module",
13+
},
14+
plugins: ["react", "react-hooks"],
15+
rules: {
16+
"react/react-in-jsx-scope": "off",
17+
"react/prop-types": "off",
18+
"react-hooks/rules-of-hooks": "error",
19+
"react-hooks/exhaustive-deps": "warn",
20+
"no-unused-vars": ["error", { argsIgnorePattern: "^_" }],
21+
},
22+
settings: {
23+
react: {
24+
version: "detect",
25+
},
26+
},
27+
globals: {
28+
useState: "readonly",
29+
useEffect: "readonly",
30+
useRef: "readonly",
31+
},
32+
};
33+

.github/workflows/ci.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
lint-and-format:
11+
name: Lint & Format Check
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
17+
- name: Setup Node.js
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: "20"
21+
cache: "npm"
22+
23+
- name: Install dependencies
24+
run: npm ci
25+
26+
- name: Check formatting
27+
run: npm run format:check
28+
29+
- name: Run ESLint
30+
run: npm run lint
31+
32+
- name: Spellcheck
33+
run: npm run spellcheck
34+
35+
validate-mdx:
36+
name: Validate MDX
37+
runs-on: ubuntu-latest
38+
steps:
39+
- name: Checkout
40+
uses: actions/checkout@v4
41+
42+
- name: Check for broken code fences
43+
run: |
44+
echo "Checking for malformed code fences (````)..."
45+
if grep -rn '````' --include="*.mdx" .; then
46+
echo "::error::Found malformed code fences (````). Use triple backticks (\`\`\`) instead."
47+
exit 1
48+
fi
49+
echo "No malformed code fences found."
50+
51+
- name: Check imports resolve
52+
run: |
53+
echo "Checking for .ts imports in MDX (Mintlify only supports .jsx)..."
54+
if grep -rn 'from.*\.ts"' --include="*.mdx" .; then
55+
echo "::error::Found .ts imports in MDX files. Mintlify only supports .jsx imports."
56+
exit 1
57+
fi
58+
echo "No .ts imports found in MDX files."

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,6 @@ mintlify-docs/
33
/CLAUDE.md
44
.windsurf.context/
55
.claude/
6+
7+
# Dependencies
8+
node_modules/

.prettierrc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"semi": true,
3+
"singleQuote": false,
4+
"tabWidth": 2,
5+
"trailingComma": "es5",
6+
"printWidth": 100,
7+
"bracketSpacing": true,
8+
"jsxSingleQuote": false
9+
}
10+

blog/light-token.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ Instead, rent is paid over time when accounts are accessed:
7474

7575
<RentLifecycleVisualizer />
7676

77-
The token accounts is initalized and funded with initial rent.
77+
The token account is initialized and funded with initial rent.
7878
When rent runs low, transactions top-up the account's rent balance.
7979
Transactions only top-up the account's rent balance, when it is low.
8080
When rent runs out, the account is automatically compressed.

cspell.json

Lines changed: 192 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,192 @@
1+
{
2+
"version": "0.2",
3+
"language": "en",
4+
"words": [
5+
"Solana",
6+
"solana",
7+
"lamports",
8+
"lamport",
9+
"pubkey",
10+
"pubkeys",
11+
"keypair",
12+
"keypairs",
13+
"blockhash",
14+
"airdrop",
15+
"devnet",
16+
"mainnet",
17+
"testnet",
18+
"localnet",
19+
"merkle",
20+
"borsh",
21+
"syscall",
22+
"syscalls",
23+
"signer",
24+
"signers",
25+
"deserialized",
26+
"deserialize",
27+
"serialized",
28+
"serialize",
29+
"helius",
30+
"Helius",
31+
"mintlify",
32+
"Mintlify",
33+
"lightprotocol",
34+
"Lightprotocol",
35+
"ctoken",
36+
"ctokens",
37+
"cmint",
38+
"cmints",
39+
"spl",
40+
"SPL",
41+
"ata",
42+
"atas",
43+
"ATA",
44+
"ATAs",
45+
"pda",
46+
"pdas",
47+
"PDA",
48+
"PDAs",
49+
"cpi",
50+
"CPI",
51+
"indexer",
52+
"indexers",
53+
"nullifier",
54+
"nullifiers",
55+
"zk",
56+
"ZK",
57+
"zkp",
58+
"ZKP",
59+
"onchain",
60+
"offchain",
61+
"defi",
62+
"DeFi",
63+
"dapp",
64+
"dapps",
65+
"dApp",
66+
"dApps",
67+
"nft",
68+
"nfts",
69+
"NFT",
70+
"NFTs",
71+
"uint",
72+
"u64",
73+
"u32",
74+
"u16",
75+
"u8",
76+
"i64",
77+
"i32",
78+
"i16",
79+
"i8",
80+
"tokio",
81+
"async",
82+
"dotenvy",
83+
"println",
84+
"Vec",
85+
"impl",
86+
"struct",
87+
"enum",
88+
"const",
89+
"mut",
90+
"fn",
91+
"sdk",
92+
"SDK",
93+
"rpc",
94+
"RPC",
95+
"rpcs",
96+
"RPCs",
97+
"api",
98+
"API",
99+
"apis",
100+
"APIs",
101+
"cli",
102+
"CLI",
103+
"json",
104+
"JSON",
105+
"yaml",
106+
"YAML",
107+
"mdx",
108+
"MDX",
109+
"jsx",
110+
"JSX",
111+
"tsx",
112+
"TSX",
113+
"eslint",
114+
"ESLint",
115+
"prettier",
116+
"Prettier",
117+
"cspell",
118+
"Github",
119+
"github",
120+
"compressible",
121+
"uncompress",
122+
"uncompressed",
123+
"decompression",
124+
"reinitialized",
125+
"reinitialize",
126+
"topup",
127+
"topups",
128+
"toolkits",
129+
"Toolkits",
130+
"codegroup",
131+
"CodeGroup",
132+
"prereq",
133+
"Prereq",
134+
"UTXO",
135+
"utxo",
136+
"reinit",
137+
"Cheatsheet",
138+
"cheatsheet",
139+
"testprogram",
140+
"deepwiki",
141+
"Deepwiki",
142+
"llms",
143+
"LLMs",
144+
"LLM",
145+
"Basemint",
146+
"basemint",
147+
"cata",
148+
"Laserstream",
149+
"laserstream",
150+
"permissionless",
151+
"Neodyme",
152+
"Zellic",
153+
"Reilabs",
154+
"Groth",
155+
"groth",
156+
"blockspace",
157+
"ated",
158+
"recompute",
159+
"merklelized",
160+
"Rollups",
161+
"rollups",
162+
"rollup",
163+
"permissionlessly",
164+
"Pennie",
165+
"Mantica",
166+
"Jens",
167+
"EUROCRYPT",
168+
"sysvar",
169+
"sysvars",
170+
"CpiAccounts"
171+
],
172+
"ignorePaths": [
173+
"node_modules",
174+
"package.json",
175+
"package-lock.json",
176+
"*.svg",
177+
"*.png",
178+
"*.jpg",
179+
"*.jpeg",
180+
"*.gif",
181+
"images/**",
182+
"logo/**"
183+
],
184+
"ignoreRegExpList": [
185+
"/```[\\s\\S]*?```/g",
186+
"/`[^`]+`/g",
187+
"/https?:\\/\\/[^\\s)]+/g",
188+
"/[A-Za-z0-9]{32,}/g",
189+
"/[\\u{1D400}-\\u{1D7FF}]+/gu"
190+
]
191+
}
192+

0 commit comments

Comments
 (0)