Skip to content

Commit f12609f

Browse files
authored
Merge branch 'main' into overview
2 parents ab89227 + 3c30902 commit f12609f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+2048
-890
lines changed

.cspell.jsonc

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,51 @@
1111
"path": "resources/dictionaries/custom.txt",
1212
"addWords": true,
1313
},
14+
{
15+
"name": "deny-list",
16+
"path": "resources/dictionaries/ban.txt"
17+
},
1418
{
1519
"name": "tvm-instructions",
1620
"path": "resources/dictionaries/tvm-instructions.txt"
1721
}
1822
],
1923
"dictionaries": [
2024
"main-list",
21-
"tvm-instructions"
25+
"deny-list",
26+
"tvm-instructions",
2227
],
2328
"useGitignore": true,
2429
"files": [
2530
"**/*.{md,mdx}",
2631
"**/*.{js,jsx}",
2732
],
33+
"minWordLength": 3,
34+
"overrides": [
35+
// Enable case sensitivity for Markdown and MDX files only
36+
{
37+
"filename": "**/*.{md,mdx}",
38+
"caseSensitive": true
39+
},
40+
// Do not check for banned words (denylist) in certain files
41+
{
42+
"filename": "contribute/style-guide*.mdx",
43+
"ignoreWords": [
44+
"tos",
45+
"DOI",
46+
"BOC",
47+
],
48+
"dictionaries": [
49+
"!deny-list"
50+
]
51+
},
52+
{
53+
"filename": "**/api/**/v*",
54+
"dictionaries": [
55+
"!deny-list"
56+
]
57+
},
58+
],
2859
"ignorePaths": [
2960
// Some whitepapers
3061
"foundations/whitepapers/tblkch.mdx",
@@ -49,7 +80,7 @@
4980
"**/*.svg",
5081
"**/*.txt",
5182
"CODEOWNERS",
52-
"**/*http-api*",
83+
"snippets/tvm-instruction-table.jsx",
5384
],
5485
"ignoreRegExpList": [
5586
//
@@ -78,7 +109,7 @@
78109
//
79110
"=\\s*\".*?\"", // ="..."
80111
"(?<!\\\\)\\$(?:\\\\.|[^$\\\\])*?\\$", // inline math
81-
"/(?<!\\\\)\\$\\$\\r?\\n.*?(?<=\\n)\\$\\$/gms", // block math
112+
"/(?<!\\\\)\\$\\$[\\s\\S]*?\\$\\$/g", // block math
82113
"(?<!\\\\)`.*?`", // inline code
83114
"/^([ \\t]*```).*([\\s\\S]*?)^\\1$/gmx", // block code
84115
"^import[ \\t].+$", // import ...

.github/workflows/linter.yml

Lines changed: 42 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ name: 💅 Linting suite
22

33
env:
44
HUSKY: 0
5+
NODE_VERSION: 20
56

67
on:
78
pull_request:
@@ -30,7 +31,7 @@ jobs:
3031
- name: Setup Node.js
3132
uses: actions/setup-node@v4
3233
with:
33-
node-version: 20
34+
node-version: ${{ env.NODE_VERSION }}
3435
cache: "npm"
3536

3637
- name: Install dependencies
@@ -62,7 +63,7 @@ jobs:
6263
echo
6364
npx remark --no-stdout --quiet --frail --silently-ignore $(echo -e "${ALL_CHANGED_FILES[@]}" | tr '\n' ' ')
6465
65-
- name: ${{ steps.check-fmt.conclusion == 'failure' && '👀' }} How to fix the formatting? See these suggestions!
66+
- name: ${{ steps.check-fmt.conclusion == 'failure' && '👀 How to fix the formatting? See these suggestions!' || '...' }}
6667
env:
6768
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
6869
if: failure()
@@ -93,7 +94,7 @@ jobs:
9394
- name: Setup Node.js
9495
uses: actions/setup-node@v4
9596
with:
96-
node-version: 20
97+
node-version: ${{ env.NODE_VERSION }}
9798
cache: "npm"
9899

99100
- name: Install dependencies
@@ -107,3 +108,41 @@ jobs:
107108
with:
108109
check_dot_files: explicit
109110
suggestions: true
111+
112+
redirects-check:
113+
name: "Redirects"
114+
runs-on: ubuntu-latest
115+
steps:
116+
- name: Checkout repository
117+
uses: actions/checkout@v4
118+
with:
119+
fetch-depth: 0
120+
121+
- name: Setup Node.js
122+
uses: actions/setup-node@v4
123+
with:
124+
node-version: ${{ env.NODE_VERSION }}
125+
cache: "npm"
126+
127+
- name: Install dependencies
128+
run: |
129+
corepack enable
130+
npm ci
131+
132+
- name: Check uniqueness of redirect sources in docs.json
133+
if: ${{ !cancelled() }}
134+
run: node scripts/check-redirects.mjs unique
135+
136+
- name: Check existence of redirect destinations in docs.json
137+
if: ${{ !cancelled() }}
138+
run: node scripts/check-redirects.mjs exist
139+
140+
- name: Check redirects against the previous TON Documentation
141+
if: ${{ !cancelled() }}
142+
run: node scripts/check-redirects.mjs previous
143+
144+
# NOTE: Re-enable before the release,
145+
# see: https://github.com/ton-org/docs/issues/39
146+
# - name: Check redirects against the upstream docs.json structure
147+
# if: ${{ !cancelled() }}
148+
# run: node scripts/check-redirects.mjs upstream

0 commit comments

Comments
 (0)