Skip to content

Commit 16787cb

Browse files
committed
chore: add commitlint and rename analytics proxy
- Switch to commitlint for conventional commit enforcement - Rename PostHog proxy from /ingest to /idata to bypass ad blockers
1 parent 462ba3c commit 16787cb

5 files changed

Lines changed: 1088 additions & 7 deletions

File tree

.husky/commit-msg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npx --no -- commitlint --edit "$1"

.vitepress/theme/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export default {
99
const isLocal = window.location.hostname === 'localhost';
1010

1111
posthog.init('phc_elW8D8ol33mfOT9p9OHf7oIeovn9r0wGE4QloAnoi0y', {
12-
api_host: isLocal ? 'https://us.i.posthog.com' : '/ingest',
12+
api_host: isLocal ? 'https://us.i.posthog.com' : '/idata',
1313
capture_pageview: false, // We'll capture manually for SPA
1414
persistence: isLocal ? 'memory' : 'localStorage+cookie',
1515
});

commitlint.config.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
export default {
2+
extends: ['@commitlint/config-conventional'],
3+
rules: {
4+
'no-claude-references': [2, 'always'],
5+
},
6+
plugins: [
7+
{
8+
rules: {
9+
'no-claude-references': ({ raw }) => {
10+
const pattern = /claude|anthropic|co-authored-by.*claude/i;
11+
const pass = !pattern.test(raw);
12+
return [
13+
pass,
14+
'Commit message must not contain references to Claude or Anthropic',
15+
];
16+
},
17+
},
18+
},
19+
],
20+
};

0 commit comments

Comments
 (0)