website refactor
This commit is contained in:
@@ -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 },
|
||||
|
||||
Reference in New Issue
Block a user