website refactor

This commit is contained in:
2026-01-16 11:51:12 +01:00
parent 63dfa58bcb
commit 0208334c59
49 changed files with 525 additions and 89 deletions

View File

@@ -0,0 +1,35 @@
module.exports = {
meta: {
type: 'problem',
docs: {
description: 'Ban index.ts files in Core - use explicit imports instead',
category: 'Best Practices',
recommended: true,
},
fixable: null,
schema: [],
messages: {
indexFile: 'Index files are banned in core. Use explicit imports. Example: Instead of "import { foo } from "./", use "import { foo } from "./foo".',
},
},
create(context) {
const filename = context.getFilename();
const isIndexFile = /(^|\/|\\)index\.ts$/.test(filename);
// Allow root index.ts if any
const allowedPaths = [
'core/index.ts',
];
if (isIndexFile && !allowedPaths.some(path => filename.endsWith(path))) {
context.report({
node: null,
loc: { line: 1, column: 0 },
messageId: 'indexFile',
});
}
return {};
},
};