website refactor

This commit is contained in:
2026-01-14 02:02:24 +01:00
parent 8d7c709e0c
commit 4522d41aef
291 changed files with 12763 additions and 9309 deletions

View File

@@ -5,42 +5,7 @@
*/
module.exports = {
// Rule 1: Services must be marked with @server-safe or @client-only
'services-must-be-marked': {
meta: {
type: 'problem',
docs: {
description: 'Enforce service safety marking',
category: 'Services',
},
messages: {
message: 'Services must be explicitly marked with @server-safe or @client-only comment - see apps/website/lib/contracts/services/Service.ts',
},
},
create(context) {
return {
Program(node) {
const filename = context.getFilename();
if (filename.includes('/lib/services/') && filename.endsWith('.ts')) {
const sourceCode = context.getSourceCode();
const text = sourceCode.getText();
const hasServerSafe = text.includes('@server-safe');
const hasClientOnly = text.includes('@client-only');
if (!hasServerSafe && !hasClientOnly) {
context.report({
loc: { line: 1, column: 0 },
messageId: 'message',
});
}
}
},
};
},
},
// Rule 2: No external API calls in services
// Rule 1: No external API calls in services
'no-external-api-in-services': {
meta: {
type: 'problem',
@@ -87,7 +52,7 @@ module.exports = {
},
},
// Rule 3: Services must be pure functions
// Rule 2: Services must be pure functions
'services-must-be-pure': {
meta: {
type: 'problem',