/**
 * ESLint rule to forbid lib/builders/page-dtos directory
 * 
 * This directory is completely forbidden.
 */

module.exports = {
  meta: {
    type: 'problem',
    docs: {
      description: 'Forbid lib/builders/page-dtos directory',
      category: 'Best Practices',
      recommended: true,
    },
    fixable: null,
    schema: [],
    messages: {
      forbiddenDirectory: 'The lib/builders/page-dtos directory is forbidden. Use lib/builders/view-data/ or lib/builders/view-models/ instead.',
    },
  },

  create(context) {
    const filename = context.getFilename();
    
    return {
      Program(node) {
        // Check if file is in the forbidden directory
        if (filename.includes('lib/builders/page-dtos')) {
          context.report({
            node,
            messageId: 'forbiddenDirectory',
          });
        }
      },
    };
  },
};
