website refactor

This commit is contained in:
2026-01-21 18:03:56 +01:00
parent 02987f60c8
commit 69319ce1d4
4 changed files with 51 additions and 43 deletions

View File

@@ -32,7 +32,13 @@ module.exports = {
'apps/website/index.ts', // Root entry
];
if (isIndexFile && !allowedPaths.some(path => filename.endsWith(path))) {
// Check if the filename ends with any of the allowed paths
// The filename is an absolute path, so we need to check if it contains the relative path
const isAllowedPath = allowedPaths.some(allowedPath => {
return filename.endsWith(allowedPath) || filename.includes('/' + allowedPath);
});
if (isIndexFile && !isAllowedPath) {
context.report({
node: null, // Report on the file level
loc: { line: 1, column: 0 },