Skip to content
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
5222542
vastly improve performance of validate-regions script
httphypixelnet Jul 28, 2026
179e717
only run dead link checker in CI
httphypixelnet Jul 28, 2026
1f8e82b
Merge branch 'main' into fix/lint-performance
httphypixelnet Jul 28, 2026
a68639b
retry ci
httphypixelnet Jul 28, 2026
617e72d
allow any file extension for source files
httphypixelnet Jul 28, 2026
5e554e3
add node types
httphypixelnet Jul 28, 2026
0169a43
better path exclusions
httphypixelnet Jul 28, 2026
347eb31
slightly improve eslint performance
httphypixelnet Jul 29, 2026
46a17f5
Merge branch 'main' into fix/lint-performance
httphypixelnet Jul 29, 2026
88c9bab
increase typescript performance
httphypixelnet Jul 29, 2026
bef03ac
narrow eslint input to improve performance
httphypixelnet Jul 29, 2026
89cf3df
add gradle path exclusion
httphypixelnet Jul 29, 2026
4b4ec18
Merge branch 'main' into fix/lint-performance
httphypixelnet Jul 29, 2026
828d333
Merge branch 'main' into fix/lint-performance
Adrianamm Jul 30, 2026
7d9d164
only run full astro check when astro files are changed
httphypixelnet Jul 30, 2026
0292004
narrow prettier run rules
httphypixelnet Jul 30, 2026
555f870
add debug functionality to script
httphypixelnet Jul 30, 2026
2e8b5ca
fix vale
httphypixelnet Jul 30, 2026
0c4089f
Remove second period from paths
httphypixelnet Jul 31, 2026
950bc41
Revert "fix vale"
httphypixelnet Aug 4, 2026
60c0fd0
resolve small comments
httphypixelnet Aug 4, 2026
c9801bf
ensure all file extensions are parsed
httphypixelnet Aug 5, 2026
bd90b8d
merge main into fix/lint-performance
httphypixelnet Aug 5, 2026
9abc6ee
Remove debug statement from validate-regions.ts
httphypixelnet Aug 5, 2026
f0faba7
Fix lint:eslint command syntax in package.json
httphypixelnet Aug 5, 2026
bc4e64a
Merge branch 'main' into fix/lint-performance
httphypixelnet Aug 8, 2026
af700b2
Merge branch 'main' into fix/lint-performance
httphypixelnet Aug 9, 2026
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
32 changes: 18 additions & 14 deletions .remarkrc.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,23 @@ export default {
remarkPresetLintRecommended,
remarkNoInlineCodeFences,
remarkNoHtmlLinks,
[
remarkLintNoDeadUrls,
{
skipLocalhost: false,
skipOffline: true,
skipUrlPatterns: [
'https://github.com/signup',
'https://code.visualstudio.com/',
'https://www.conventionalcommits.org/en/v1.0.0/',
'https://vale.sh/',
'https://squoosh.app/',
], // Add known flaky URL patterns here
},
],
// @ts-expect-error I don't think we should add node types to an astro project?
Comment thread
httphypixelnet marked this conversation as resolved.
Outdated
// only run dead link checker in CI to save time in dev
process.env.CI
? [
remarkLintNoDeadUrls,
{
skipLocalhost: false,
skipOffline: true,
skipUrlPatterns: [
'https://github.com/signup',
'https://code.visualstudio.com/',
'https://www.conventionalcommits.org/en/v1.0.0/',
'https://vale.sh/',
'https://squoosh.app/',
], // Add known flaky URL patterns here
},
]
: () => undefined,
],
};
11 changes: 10 additions & 1 deletion scripts/validate-regions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const CODE_REGION_SOURCES_KEY_RE = /^codeRegionSources:\s*$/;
const CODE_REGION_SOURCE_ENTRY_RE = /^\s+([\w-]+):\s*(.+?)\s*$/;

const errors: string[] = [];
const extensions: Set<string> = new Set();

function parseCodeRegionSources(content: string): Map<string, string> {
const sources = new Map<string, string>();
Expand All @@ -35,9 +36,9 @@ function parseCodeRegionSources(content: string): Map<string, string> {
const m = line.match(CODE_REGION_SOURCE_ENTRY_RE);
if (m) {
sources.set(m[1]!, m[2]!);
extensions.add(m[2]!.split('.').at(-1)!);
Comment thread
httphypixelnet marked this conversation as resolved.
}
}

return sources;
}

Expand Down Expand Up @@ -147,11 +148,19 @@ function validateSource(filePath: string) {
}

function walkExamples(dir: string) {
if (dir.indexOf('build') != -1 || dir.indexOf('gradle') != -1) {
// don't even bother with directories that won't contain source files
return;
}
for (const entry of readdirSync(dir, { withFileTypes: true })) {
const full = join(dir, entry.name);
if (entry.isDirectory()) {
walkExamples(full);
} else {
if (!extensions.has(full.split('.').at(-1)!)) {
// we only care about source files
continue;
}
validateSource(full);
}
}
Expand Down